Skip to content

Commit 7323815

Browse files
authored
Fix B029 typo (#355)
1 parent fa49539 commit 7323815

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ limitations make it difficult.
177177
stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called.
178178
It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.
179179

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

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

@@ -334,7 +334,7 @@ Change Log
334334
order to maintain backwards compatibility with Python 3.7.
335335
* B016: Warn when raising f-strings.
336336
* Add B028: Check for an explicit stacklevel keyword argument on the warn method from the warnings module.
337-
* Add B029: Check when trying to use ``except`` with an empty tuple i.e. ``except: ()``.
337+
* Add B029: Check when trying to use ``except`` with an empty tuple i.e. ``except ():``.
338338
* Add B030: Check that except handlers only use exception classes or tuples of exception classes.
339339
Fixes crash on some rare except handlers.
340340
* Add B031: Check that ``itertools.groupby()`` is not used multiple times.

bugbear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ def visit_Lambda(self, node):
16291629
)
16301630
B029 = Error(
16311631
message=(
1632-
"B029 Using `except: ()` with an empty tuple does not handle/catch "
1632+
"B029 Using `except ():` with an empty tuple does not handle/catch "
16331633
"anything. Add exceptions to handle."
16341634
)
16351635
)

0 commit comments

Comments
 (0)