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 c606d03 commit 0f362f5Copy full SHA for 0f362f5
astroid/protocols.py
@@ -538,7 +538,8 @@ 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 = list(
+ # pylint: disable-next=stop-iteration-return
542
+ eg = next(
543
node_classes.unpack_infer(
544
extract_node(
545
"""
@@ -547,7 +548,7 @@ def _generate_assigned():
547
548
549
)
550
- )[0]
551
+ )
552
assigned = objects.ExceptionInstance(eg)
553
assigned.instance_attrs["exceptions"] = [
554
nodes.List.from_elements(_generate_assigned())
0 commit comments