Skip to content

Commit

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

Please sign in to comment.