-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Relax mypy in prototype namespace #7091
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
Conversation
@@ -7,7 +7,7 @@ allow_redefinition = True | |||
no_implicit_optional = True | |||
warn_redundant_casts = True | |||
|
|||
[mypy-torchvision.prototype.features.*] |
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.
Driveby
@@ -98,7 +98,7 @@ def __torch_function__( | |||
# `args = (torch.Tensor(), datapoints.Image())` first. Without this guard, the original `torch.Tensor` would | |||
# be wrapped into a `datapoints.Image`. | |||
if wrapper and isinstance(args[0], cls): | |||
return wrapper(cls, args[0], output) # type: ignore[no-any-return] | |||
return wrapper(cls, args[0], output) |
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.
No longer needed without the extra strictness.
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 Philip
Hey @pmeier! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Reviewed By: YosuaMichael Differential Revision: D42706912 fbshipit-source-id: cc7e003fe5e17772304d52b346f78d5182fdb005
See 2. in #7084 (review).
cc @bjuncek