-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added example for bad-except-order #5997
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
Co-authored-by: Vladyslav Krylasov <[email protected]>
5999cba to
ca50f70
Compare
Pull Request Test Coverage Report for Build 2047857185
π - Coveralls |
| except Exception: | ||
| raise |
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.
This would emit try-except-raise, I think, so maybe we should model doing something with the exception?
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.
Based on this discussion #5992 (comment) we should prefer simplicity/readability over code cleanness.
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.
That's fair, but I think a flexible approach to this is worth considering, because I suspect we'll get an issue someday "I rewrote my code the way pylint said to but then I got another error".
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.
I leave the decision to @Pierre-Sassoulas and @DanielNoord
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.
How about a pass instead of a raise ? Still simple, but no try-except-raise ?
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.
I guess it's a losing battle because bare-exception is also in play (probably?). So I'm willing to leave this be π
Type of Changes
Description
Closes partially #5953