-
Notifications
You must be signed in to change notification settings - Fork 104
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
B015: prepend "assert" and fix verb tense #150
Conversation
stevepiercy
commented
Nov 29, 2020
- See B015 Pointless comparison advice is not complete #149
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.
Sure, might click some people's brains to understand the lint better. So thanks.
@@ -118,7 +118,7 @@ instead of ``except (SomeError,):``. | |||
Write ``except Exception:``, which catches exactly the same exceptions. | |||
|
|||
**B015**: Pointless comparison. This comparison does nothing but | |||
wastes CPU instructions. Remove it. | |||
waste CPU instructions. Either prepend ``assert`` or remove it. |
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.
FWIW, assert
could possibly not always technically be the right thing too ...