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

Suggest using upper bound for unbound tvar #13730

Merged
merged 3 commits into from Sep 26, 2022

Conversation

hauntsaninja
Copy link
Collaborator

Also don't complain about other TypeVarLikeTypes

Implements #13166 (comment)

Also don't complain about other TypeVarLikeTypes

Implements python#13166 (comment)
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@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/models/_api.py:118: note: Consider using the upper bound "WeightsEnum" instead
+ torchvision/models/_api.py:222: note: Consider using the upper bound "Any" instead

artigraph (https://github.com/artigraph/artigraph)
+ src/arti/internal/dispatch.py:36: note: Consider using the upper bound "Callable[..., Any]" instead

pandera (https://github.com/pandera-dev/pandera)
+ pandera/engines/engine.py:184: note: Consider using the upper bound "DataType" instead

spark (https://github.com/apache/spark)
+ python/pyspark/ml/wrapper.py:271: note: Consider using the upper bound "JavaParams" instead

@hauntsaninja hauntsaninja merged commit 6a4c2c8 into python:master Sep 26, 2022
@hauntsaninja hauntsaninja deleted the typevar-suggest branch September 26, 2022 17:38
ilevkivskyi pushed a commit that referenced this pull request Oct 2, 2022
Also don't complain about other TypeVarLikeTypes

Implements
#13166 (comment)
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.

None yet

2 participants