-
Notifications
You must be signed in to change notification settings - Fork 261
MNT: Apply refurb suggestions #1153
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
Conversation
455cc99
to
67bde44
Compare
[FURB125]: Return is redundant here
[FURB115]: Replace `len(x) > 0` with `x`
[FURB113]: Use `x.extend(...)` instead of repeatedly calling `x.append()`
[FURB110]: Use `x or y` instead of `x if x else y`
[FURB123]: Replace `int(x)` with `x`
[FURB108]: Use `x in (y, z)` instead of `x == y or x == z`
[FURB118]: Replace lambda with `operator.eq`
67bde44
to
4769e0c
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.
Overall looks reasonable. Thanks! Two suggestions.
Codecov ReportBase: 91.81% // Head: 91.84% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
+ Coverage 91.81% 91.84% +0.02%
==========================================
Files 101 101
Lines 12463 12447 -16
Branches 2238 2237 -1
==========================================
- Hits 11443 11432 -11
+ Misses 693 688 -5
Partials 327 327
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
x in (y, z)
instead ofx == y or x == z
x or y
instead ofx if x else y
x.extend(...)
instead of repeatedly callingx.append()
len(x) > 0
withx
operator.eq
int(x)
withx