We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69619ce commit 13ad3dbCopy full SHA for 13ad3db
astroid/protocols.py
@@ -538,11 +538,16 @@ def _generate_assigned():
538
if isinstance(self.parent, node_classes.TryStar):
539
# except * handler has assigned ExceptionGroup with caught
540
# exceptions under exceptions attribute
541
- eg = next(node_classes.unpack_infer(
542
- extract_node('''
+ eg = next(
+ node_classes.unpack_infer(
543
+ extract_node(
544
+ """
545
from builtins import ExceptionGroup
546
ExceptionGroup
-''')))
547
+"""
548
+ )
549
550
551
assigned = objects.ExceptionInstance(eg)
552
assigned.instance_attrs["exceptions"] = [
553
nodes.List.from_elements(_generate_assigned())
0 commit comments