-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Try to fix mypy issue with calculate_md5 #6493
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
@NicolasHug yes, @pmeier pointed out to me his PR. Let me recap the findings from my local tests using conda env on macosx :
mypy version: mypy 0.971 (compiled: yes) |
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.
LGTM! It simplifies the code as well while not specifying Python to 3.10 as the previous attempt.
It seems that
My PR is not primarily about fixing this issue, but rather making these issues visible in CI. The change made in this PR cannot be verified by CI, but has to be done manually. Meaning, if someone introduces a change like I did in #5717, we will not know until someone on Python >= 3.7 is getting errors on main. |
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.
mypy
will always surprise me at how it behaves so differently on 2 pieces of code which look like the exact same thing externally...
Thanks @vfdev-5, I agree we can merge as this issue has been an inconvenience for local development
Hey @vfdev-5! 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: NicolasHug Differential Revision: D39131019 fbshipit-source-id: 926d5ad1055dc9e95c5f9f42382a506e1b604383
and passing locally on python 3.9 without errors like: