From b823a4bab1fec3edd913fe74658176317191c881 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 5 Apr 2022 06:02:28 -0400 Subject: [PATCH] [commands] Only update annotation if an explicit override is given --- discord/ext/commands/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 6ef424f56..cf1d8ff88 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -137,7 +137,9 @@ def get_signature_parameters( for name, parameter in iterator: default = parameter.default if isinstance(default, Parameter): # update from the default - parameter._annotation = default.annotation + if default.annotation is not Parameter.empty: + parameter._annotation = default.annotation + parameter._default = default.default parameter._displayed_default = default._displayed_default