Fix add_handler auto-type detection

This commit is contained in:
Lonami Exo 2022-02-04 11:46:08 +01:00
parent cb628f3cce
commit 46ba9696aa

View File

@ -56,7 +56,7 @@ def add_event_handler(
if event is None:
for param in inspect.signature(callback).parameters.values():
event = param.annotation
event = None if param.annotation is inspect.Signature.empty else param.annotation
break # only check the first parameter
if event is None: