Ignore linting error when accessing Python 3.10 unions

This commit is contained in:
Rapptz 2021-07-04 05:55:29 -04:00
parent 5d798aa5e6
commit 4152819a3c

View File

@ -896,7 +896,7 @@ def evaluate_annotation(
is_literal = False
args = tp.__args__
if not hasattr(tp, '__origin__'):
if PY_310 and tp.__class__ is types.Union:
if PY_310 and tp.__class__ is types.Union: # type: ignore
converted = Union[args] # type: ignore
return evaluate_annotation(converted, globals, locals, cache)