mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Fix caching of UnionType instead of resolved typing.Union
This commit is contained in:
@ -1032,9 +1032,9 @@ def evaluate_annotation(
|
||||
if implicit_str and isinstance(tp, str):
|
||||
if tp in cache:
|
||||
return cache[tp]
|
||||
evaluated = eval(tp, globals, locals)
|
||||
evaluated = evaluate_annotation(eval(tp, globals, locals), globals, locals, cache)
|
||||
cache[tp] = evaluated
|
||||
return evaluate_annotation(evaluated, globals, locals, cache)
|
||||
return evaluated
|
||||
|
||||
if hasattr(tp, '__args__'):
|
||||
implicit_str = True
|
||||
|
Reference in New Issue
Block a user