mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Rename types.Union -> UnionType for bpo-44732
This commit is contained in:
parent
d08725b0f0
commit
608e3b5b6c
@ -916,7 +916,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: # type: ignore
|
if PY_310 and tp.__class__ is types.UnionType: # 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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user