Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent capitalization of TypeVar #13687

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Sep 19, 2022

Description

Changed Typevar -> TypeVar in the error message from #13166.

I was testing the mypy 0.980 pre-release builds and noticed that the error message was using inconsistent capitalization.

Test Plan

Covered by existing tests, updated relevant test cases.

Changed `Typevar` -> `TypeVar` in the error message from python#13166.

I was testing the mypy 0.980 pre-release builds and noticed that the error message was using inconsistent capitalization.
@intgr
Copy link
Contributor Author

intgr commented Sep 19, 2022

Ping @AurelienJaquier, the author of #13166.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

vision (https://github.com/pytorch/vision)
- torchvision/prototype/datasets/utils/_internal.py:75: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ torchvision/prototype/datasets/utils/_internal.py:75: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]
- torchvision/models/_api.py:118: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ torchvision/models/_api.py:118: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]
- torchvision/models/_api.py:222: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ torchvision/models/_api.py:222: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/dependencies/data.py:321: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ tanjun/dependencies/data.py:321: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

artigraph (https://github.com/artigraph/artigraph)
- src/arti/internal/dispatch.py:36: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ src/arti/internal/dispatch.py:36: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/auth.py:36: error: A function returning TypeVar should receive at least one argument containing the same Typevar
+ src/schemathesis/auth.py:36: error: A function returning TypeVar should receive at least one argument containing the same TypeVar

paasta (https://github.com/yelp/paasta)
- paasta_tools/utils.py:3977: error: A function returning TypeVar should receive at least one argument containing the same Typevar
+ paasta_tools/utils.py:3977: error: A function returning TypeVar should receive at least one argument containing the same TypeVar
- paasta_tools/utils.py:3984: error: A function returning TypeVar should receive at least one argument containing the same Typevar
+ paasta_tools/utils.py:3984: error: A function returning TypeVar should receive at least one argument containing the same TypeVar

anyio (https://github.com/agronholm/anyio)
- src/anyio/from_thread.py:122: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ src/anyio/from_thread.py:122: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

pandera (https://github.com/pandera-dev/pandera)
- pandera/engines/engine.py:184: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ pandera/engines/engine.py:184: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

spark (https://github.com/apache/spark)
- python/pyspark/ml/wrapper.py:271: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ python/pyspark/ml/wrapper.py:271: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

pegen (https://github.com/we-like-parsers/pegen)
- src/pegen/parser.py:25: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ src/pegen/parser.py:25: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]
- src/pegen/parser.py:45: error: A function returning TypeVar should receive at least one argument containing the same Typevar  [type-var]
+ src/pegen/parser.py:45: error: A function returning TypeVar should receive at least one argument containing the same TypeVar  [type-var]

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching!

@hauntsaninja hauntsaninja merged commit 1d4395f into python:master Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants