-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
hauntsaninja
merged 1 commit into
python:master
from
intgr:consistently-capitalize-typevar
Sep 19, 2022
Merged
Use consistent capitalization of TypeVar
#13687
hauntsaninja
merged 1 commit into
python:master
from
intgr:consistently-capitalize-typevar
Sep 19, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Ping @AurelienJaquier, the author of #13166. |
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]
|
hauntsaninja
approved these changes
Sep 19, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.