Skip to content

Commit 7fa6e4d

Browse files
DanielNoordPierre-Sassoulas
authored andcommitted
Add ignore for incorrect typing of attribute
1 parent 58f9a48 commit 7fa6e4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

astroid/brain/brain_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def infer_typing_attr(
150150
) -> typing.Iterator[ClassDef]:
151151
"""Infer a typing.X[...] subscript"""
152152
try:
153-
value = next(node.value.infer())
153+
value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript.
154154
except (InferenceError, StopIteration) as exc:
155155
raise UseInferenceDefault from exc
156156

0 commit comments

Comments
 (0)