File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ limitations make it difficult.
177
177
stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called.
178
178
It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.
179
179
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.
181
181
182
182
**B030 **: Except handlers should only be exception classes or tuples of exception classes.
183
183
@@ -334,7 +334,7 @@ Change Log
334
334
order to maintain backwards compatibility with Python 3.7.
335
335
* B016: Warn when raising f-strings.
336
336
* 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 (): ``.
338
338
* Add B030: Check that except handlers only use exception classes or tuples of exception classes.
339
339
Fixes crash on some rare except handlers.
340
340
* Add B031: Check that ``itertools.groupby() `` is not used multiple times.
Original file line number Diff line number Diff line change @@ -1629,7 +1629,7 @@ def visit_Lambda(self, node):
1629
1629
)
1630
1630
B029 = Error (
1631
1631
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 "
1633
1633
"anything. Add exceptions to handle."
1634
1634
)
1635
1635
)
You can’t perform that action at this time.
0 commit comments