From 7fa6e4d5a5218468606a43e10ba86bdf335ec3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Mon, 17 Jan 2022 18:24:39 +0100 Subject: Add ignore for incorrect typing of attribute --- astroid/brain/brain_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index de89f1aa..4f9cfdcc 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -150,7 +150,7 @@ def infer_typing_attr( ) -> typing.Iterator[ClassDef]: """Infer a typing.X[...] subscript""" try: - value = next(node.value.infer()) + value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. except (InferenceError, StopIteration) as exc: raise UseInferenceDefault from exc -- cgit v1.2.1