-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
Replace if statement with if expression #633
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #633 +/- ##
=======================================
Coverage 76.92% 76.93%
=======================================
Files 317 317
Lines 9639 9630 -9
Branches 469 465 -4
=======================================
- Hits 7415 7409 -6
+ Misses 2073 2070 -3
Partials 151 151
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thanks! Looks good, but I see some more code improvements.
@yezz123 , do you plan to continue work on the pr? |
Co-authored-by: Michal Čihař <[email protected]>
Proposed changes
Python's conditional expression syntax is its version of the ternary operator. Using this syntax is definitely more concise, but it is one of the more controversial refactorings (along with list comprehensions). Some coders dislike these expressions and find them slightly harder to parse than writing them out fully.
Types of changes
Please check the type of change your PR introduces:
Checklist