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
Check variable assignments that immediately return #5911
Conversation
@pyvista-bot LGTM |
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.
✅ Approving this PR because tkoyama010 said so in here
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5911 +/- ##
==========================================
- Coverage 96.99% 96.99% -0.01%
==========================================
Files 141 141
Lines 24641 24624 -17
==========================================
- Hits 23900 23883 -17
Misses 741 741 |
@pyvista-bot LGTM |
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.
✅ Approving this PR because tkoyama010 said so in here
@pyvista-bot LGTM |
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.
✅ Approving this PR because tkoyama010 said so in here
Overview
Checks for variable assignments that immediately precede a
return
of the assigned variable.Note
https://docs.astral.sh/ruff/rules/unnecessary-assign/
Caution
Based on this comment, ignore checks for changes in the composition of the if statement.