mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Fix nested Annotated calls not resolving
This commit is contained in:
@ -1062,6 +1062,11 @@ def evaluate_annotation(
|
||||
cache[tp] = evaluated
|
||||
return evaluated
|
||||
|
||||
if hasattr(tp, '__metadata__'):
|
||||
# Annotated[X, Y] can access Y via __metadata__
|
||||
metadata = tp.__metadata__[0]
|
||||
return evaluate_annotation(metadata, globals, locals, cache)
|
||||
|
||||
if hasattr(tp, '__args__'):
|
||||
implicit_str = True
|
||||
is_literal = False
|
||||
|
Reference in New Issue
Block a user