Skip to content

Commit 16032d5

Browse files
committed
Exclude StopIteration handlers from coverage
1 parent f19e9bf commit 16032d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

astroid/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def class_or_tuple_to_container(
178178
# raises InferenceError if any of the inferences fall through
179179
try:
180180
node_infer = next(node.infer(context=context))
181-
except StopIteration as e:
181+
except StopIteration as e: # pragma: no cover
182182
raise InferenceError(node=node, context=context) from e
183183
# arg2 MUST be a type or a TUPLE of types
184184
# for isinstance
@@ -187,7 +187,7 @@ def class_or_tuple_to_container(
187187
class_container = [
188188
next(node.infer(context=context)) for node in node_infer.elts
189189
]
190-
except StopIteration as e:
190+
except StopIteration as e: # pragma: no cover
191191
raise InferenceError(node=node, context=context) from e
192192
else:
193193
class_container = [node_infer]

0 commit comments

Comments
 (0)