Skip to content

Commit

Permalink
B015: prepend "assert" and fix verb tense (#150)
Browse files Browse the repository at this point in the history
- See #149
  • Loading branch information
stevepiercy committed Nov 29, 2020
1 parent fa82ac5 commit 836139b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -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.

**B016**: Cannot raise a literal. Did you intend to return it or raise
an Exception?
Expand Down
4 changes: 2 additions & 2 deletions bugbear.py
Expand Up @@ -687,8 +687,8 @@ def visit(self, node):
}
B015 = Error(
message=(
"B015 Pointless comparison. This comparison does nothing but wastes "
"CPU instructions. Remove it."
"B015 Pointless comparison. This comparison does nothing but waste "
"CPU instructions. Either prepend `assert` or remove it."
)
)
B016 = Error(
Expand Down

0 comments on commit 836139b

Please sign in to comment.