Skip to content

Commit

Permalink
Fix B029 typo (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
gschaffner committed Feb 16, 2023
1 parent fa49539 commit 7323815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ limitations make it difficult.
stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called.
It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.

**B029**: Using ``except: ()`` with an empty tuple does not handle/catch anything. Add exceptions to handle.
**B029**: Using ``except ():`` with an empty tuple does not handle/catch anything. Add exceptions to handle.

**B030**: Except handlers should only be exception classes or tuples of exception classes.

Expand Down Expand Up @@ -334,7 +334,7 @@ Change Log
order to maintain backwards compatibility with Python 3.7.
* B016: Warn when raising f-strings.
* Add B028: Check for an explicit stacklevel keyword argument on the warn method from the warnings module.
* Add B029: Check when trying to use ``except`` with an empty tuple i.e. ``except: ()``.
* Add B029: Check when trying to use ``except`` with an empty tuple i.e. ``except ():``.
* Add B030: Check that except handlers only use exception classes or tuples of exception classes.
Fixes crash on some rare except handlers.
* Add B031: Check that ``itertools.groupby()`` is not used multiple times.
Expand Down
2 changes: 1 addition & 1 deletion bugbear.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ def visit_Lambda(self, node):
)
B029 = Error(
message=(
"B029 Using `except: ()` with an empty tuple does not handle/catch "
"B029 Using `except ():` with an empty tuple does not handle/catch "
"anything. Add exceptions to handle."
)
)
Expand Down

0 comments on commit 7323815

Please sign in to comment.