From a2df6e81b883fa514266f1ceb4d0216f91cae4b7 Mon Sep 17 00:00:00 2001 From: Olivia <35444188+RocketRace@users.noreply.github.com> Date: Wed, 28 Apr 2021 11:04:18 +0900 Subject: [PATCH] [commands] Update error message for Literal float/complex --- discord/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/utils.py b/discord/utils.py index 293103cd7..d78c35a92 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -866,7 +866,7 @@ def evaluate_annotation( evaluated_args = tuple(evaluate_annotation(arg, globals, locals, cache, implicit_str=implicit_str) for arg in args) 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, float or complex.') + raise TypeError('Literal arguments must be of type str, int, bool, or NoneType.') if evaluated_args == args: return tp