Skip to content

Commit 0f362f5

Browse files
committed
Make both ruff and pylint happy
1 parent c606d03 commit 0f362f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

astroid/protocols.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ def _generate_assigned():
538538
if isinstance(self.parent, node_classes.TryStar):
539539
# except * handler has assigned ExceptionGroup with caught
540540
# exceptions under exceptions attribute
541-
eg = list(
541+
# pylint: disable-next=stop-iteration-return
542+
eg = next(
542543
node_classes.unpack_infer(
543544
extract_node(
544545
"""
@@ -547,7 +548,7 @@ def _generate_assigned():
547548
"""
548549
)
549550
)
550-
)[0]
551+
)
551552
assigned = objects.ExceptionInstance(eg)
552553
assigned.instance_attrs["exceptions"] = [
553554
nodes.List.from_elements(_generate_assigned())

0 commit comments

Comments
 (0)