We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c6950c commit ded9372Copy full SHA for ded9372
doc/whatsnew/fragments/10106.breaking
@@ -0,0 +1,3 @@
1
+Fix AttributeError: 'Lambda' object has no attribute 'bases' in exceptions checker
2
+
3
+Closes #10106
pylint/checkers/exceptions.py
@@ -432,7 +432,7 @@ def _check_catching_non_exception(
432
return
433
if all(
434
node
435
- and (utils.inherit_from_std_ex(node) or not utils.has_known_bases(node))
+ and (utils.inherit_from_std_ex(node) or (isinstance(node, nodes.ClassDef) and not utils.has_known_bases(node)))
436
for node in inferred
437
):
438
0 commit comments