-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Enable RUF018 rule for walrus assignments in asserts #18886
Conversation
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #18886 +/- ##
=========================================
+ Coverage 73% 82% +9%
=========================================
Files 443 443
Lines 35417 35417
=========================================
+ Hits 25831 29151 +3320
+ Misses 9586 6266 -3320 |
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.
Neat
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.
thought this was already enforced by black
...
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 !
(cherry picked from commit 018a308)
(cherry picked from commit 018a308)
(cherry picked from commit 018a308)
What does this PR do?
Enables this new rule in ruff: astral-sh/ruff#7205
We ran into this issue in #18496, and the new rule will prevent that in the future.
📚 Documentation preview 📚: https://pytorch-lightning--18886.org.readthedocs.build/en/18886/
cc @Borda @carmocca @justusschock @awaelchli