-
Notifications
You must be signed in to change notification settings - Fork 530
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
STY: Apply ruff/flake8-simplify rules (SIM) #3676
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3676 +/- ##
==========================================
+ Coverage 70.87% 70.89% +0.02%
==========================================
Files 1276 1276
Lines 59238 59209 -29
Branches 9812 9814 +2
==========================================
- Hits 41984 41977 -7
+ Misses 16079 16061 -18
+ Partials 1175 1171 -4 ☔ View full report in Codecov by Sentry. |
3d6d91f
to
6542864
Compare
ba2eac6
to
a2681fa
Compare
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.
Caught a couple new things.
30b0b9b
to
306689f
Compare
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.
Needs a merge conflict resolved, but otherwise good to go.
SIM101 Multiple `isinstance` calls for expression, merge into a single call
SIM103 Return the condition directly
SIM113 Use `enumerate()` for index variable in `for` loop
SIM115 Use a context manager for opening files
SIM118 Use `key in dict` instead of `key in dict.keys()`
SIM201 Use `... != ...` instead of `not ... == ...`
SIM401 Use `.get()` instead of an `if` block
Co-authored-by: Chris Markiewicz <[email protected]>
306689f
to
d040d84
Compare
Summary
Apply assorted flake8-simplify (SIM) rules.