-
Notifications
You must be signed in to change notification settings - Fork 1.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
[MAINTENANCE] Enable SIM211 #9832
Conversation
✅ Deploy Preview for niobium-lead-7998 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
version Changes by gabriel
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9832 +/- ##
========================================
Coverage 82.54% 82.55%
========================================
Files 504 504
Lines 45097 45097
========================================
+ Hits 37227 37228 +1
+ Misses 7870 7869 -1
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.
LGTM
https://docs.astral.sh/ruff/rules/if-expr-with-false-true/
if-expr-with-false-true (SIM211)
Derived from the flake8-simplify linter.
Fix is always available.
What it does
Checks for
if
expressions that can be replaced by negating a givencondition.
Why is this bad?
if
expressions that evaluate toFalse
for a truthy condition andTrue
for a falsey condition can be replaced with
not
operators, which are moreconcise and readable.
Example
Use instead:
References