only bound methods pls
This commit is contained in:
parent
3f139e3209
commit
c9df58860b
@ -1345,8 +1345,8 @@ def check_fn_match_arg_spec(
|
||||
EventFnArgMismatch: Raised if the number of mandatory arguments do not match
|
||||
"""
|
||||
user_args = inspect.getfullargspec(user_func).args
|
||||
# Drop the first argument if it's a method
|
||||
if inspect.ismethod(user_func):
|
||||
# Drop the first argument if it's a bound method
|
||||
if inspect.ismethod(user_func) and user_func.__self__ is not None:
|
||||
user_args = user_args[1:]
|
||||
|
||||
user_default_args = inspect.getfullargspec(user_func).defaults
|
||||
|
Loading…
Reference in New Issue
Block a user