mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Ignore linting error when accessing Python 3.10 unions
This commit is contained in:
@ -896,7 +896,7 @@ def evaluate_annotation(
|
|||||||
is_literal = False
|
is_literal = False
|
||||||
args = tp.__args__
|
args = tp.__args__
|
||||||
if not hasattr(tp, '__origin__'):
|
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
|
converted = Union[args] # type: ignore
|
||||||
return evaluate_annotation(converted, globals, locals, cache)
|
return evaluate_annotation(converted, globals, locals, cache)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user