-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
chore: use contextlib.surpress instead of passing on error #24896
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24896 +/- ##
==========================================
+ Coverage 68.96% 69.02% +0.06%
==========================================
Files 1906 1906
Lines 74122 74075 -47
Branches 8208 8208
==========================================
+ Hits 51116 51132 +16
+ Misses 20883 20820 -63
Partials 2123 2123
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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 @sebastianliebscher for the refactor and code cleanup.
) Co-authored-by: John Bodley <[email protected]>
) Co-authored-by: John Bodley <[email protected]>
) Co-authored-by: John Bodley <[email protected]>
SUMMARY
This PR uses contextlib's
suppress
for passing a specific error, instead ofpass
ing in an exception handler. The context manager shortens the code a bit and explicitly states the authors intend to ignore specific errors, thus improving readability.Also, if I found the possibility, I used the walrus (
:=
) operator.TESTING INSTRUCTIONS
run unit and integration tests
ADDITIONAL INFORMATION