mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Fix Optional normalisation not working properly
This commit is contained in:
parent
ae1aaac5a7
commit
26fc694189
@ -1047,9 +1047,6 @@ def evaluate_annotation(
|
||||
if is_literal and not all(isinstance(x, (str, int, bool, type(None))) for x in evaluated_args):
|
||||
raise TypeError('Literal arguments must be of type str, int, bool, or NoneType.')
|
||||
|
||||
if evaluated_args == args:
|
||||
return tp
|
||||
|
||||
try:
|
||||
return tp.copy_with(evaluated_args)
|
||||
except AttributeError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user