From 608e3b5b6c20c46c535b89fcebcf5bf2048cb63c Mon Sep 17 00:00:00 2001 From: James <50501825+Gobot1234@users.noreply.github.com> Date: Sat, 31 Jul 2021 02:30:25 +0100 Subject: [PATCH] Rename types.Union -> UnionType for bpo-44732 --- discord/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/utils.py b/discord/utils.py index dac6f9da0..920222a94 100644 --- a/discord/utils.py +++ b/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)