-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Replace isort and flake8 with Ruff checker #20442
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20442 +/- ##
=======================================
Coverage 82.01% 82.01%
=======================================
Files 514 514
Lines 47183 47192 +9
Branches 7409 7408 -1
=======================================
+ Hits 38697 38706 +9
Misses 6696 6696
Partials 1790 1790
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 the PR! We can definitely consider this change. Please take a look at the code format check failure.
Looking at the speedup via $ time bash shell/lint.sh
...
real 0m3.153s
user 0m29.378s
sys 0m0.430s and with this PR are significantly faster: $ time bash shell/lint.sh
...
real 0m0.030s
user 0m0.029s
sys 0m0.053s |
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, thank you
This PR replaces isort and flake8 lint tools with Ruff check tools. The rational is that Ruff is very fast, which has earned it's recent popularity. It also has Drop-in parity with flake8, isort, and Black.
With the transition, the old configurations are mapped to new configurations. Some of these were redundant or some ignores have no effect, so are not transitioned.
This PR does not replace Black with Ruff format, as this would incur more changed files (I'm seeking for minimal changes to source files). But a follow-up PR can replace Black with Ruff format, with the updated source files.