Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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