-
Notifications
You must be signed in to change notification settings - Fork 7k
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
upgrade linters #7680
base: main
Are you sure you want to change the base?
upgrade linters #7680
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7680
Note: Links to docs will display an error until the docs builds have been completed. ✅ 3 Unrelated FailuresAs of commit f7aebe8: BROKEN TRUNK - The following jobs failed but were present on the merge base 22d981f:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
.pre-commit-config.yaml
Outdated
- black == 23.3.0 | ||
- usort == 1.0.7 |
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.
We can't, unfortunately.
We have to stick to what is used by pyfmt
internally
nicolashug@devvm779 ~ ❯❯❯ pyfmt --version
fb-pyfmt built mode/opt (xar) on Python 3.10.9+fb (platform010)
ufmt version 2.0.1
black version 22.12.0
usort version 1.0.5
libcst version 0.4.10
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.
Updated the config to match the pyfmt
requirements.
Important file to review is
.pre-commit-config.yaml
. Everything else are automatic changes. The major ones:As suspected in remove obsolete transforms tests #7678 (comment),
black >= 23
removes blank lines after function definitions, which accounts for most of the removals in this PR.flake8==6
gained the support to check for individual unused imports. Meaningwas fine before, but will now be flagged, since
baz
is unused. Sinceflake8
doesn't account for (ancient)# type
comments, we had a lot of false flags. I've usedcom2ann
to migrate to best practice of using inline annotations.@mpearce25 I only now remembered that you have #7222 for the
flake8
update. I'm sorry that I forgot about it. In case we move forward with my PR here, are you ok if I attribute you as co-author here and close the original PR?