Browse Source
Rename types.Union -> UnionType for bpo-44732
pull/7313/head
James
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
discord/utils.py
|
|
@ -916,7 +916,7 @@ def evaluate_annotation( |
|
|
|
is_literal = False |
|
|
|
args = tp.__args__ |
|
|
|
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 |
|
|
|
return evaluate_annotation(converted, globals, locals, cache) |
|
|
|
|
|
|
|