subtract 1 arg if the method is a bound method
This commit is contained in:
parent
e0d1a58496
commit
8f578d9e60
@ -1353,6 +1353,10 @@ def check_fn_match_arg_spec(
|
||||
|
||||
number_of_event_args = len(parsed_event_args)
|
||||
|
||||
# Subtract 1 if the method is a bound method
|
||||
if inspect.ismethod(user_func):
|
||||
number_of_user_args -= 1
|
||||
|
||||
if number_of_user_args - number_of_user_default_args > number_of_event_args:
|
||||
raise EventFnArgMismatch(
|
||||
f"Event {key} only provides {number_of_event_args} arguments, but "
|
||||
|
Loading…
Reference in New Issue
Block a user