mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 04:17:16 +00:00
[commands] Only update annotation if an explicit override is given
This commit is contained in:
parent
c582940401
commit
b823a4bab1
@ -137,7 +137,9 @@ def get_signature_parameters(
|
|||||||
for name, parameter in iterator:
|
for name, parameter in iterator:
|
||||||
default = parameter.default
|
default = parameter.default
|
||||||
if isinstance(default, Parameter): # update from the default
|
if isinstance(default, Parameter): # update from the default
|
||||||
|
if default.annotation is not Parameter.empty:
|
||||||
parameter._annotation = default.annotation
|
parameter._annotation = default.annotation
|
||||||
|
|
||||||
parameter._default = default.default
|
parameter._default = default.default
|
||||||
parameter._displayed_default = default._displayed_default
|
parameter._displayed_default = default._displayed_default
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user