Skip to content

Commit

Permalink
only bound methods pls
Browse files Browse the repository at this point in the history
  • Loading branch information
benedikt-bartscher committed Nov 10, 2024
1 parent 3f139e3 commit c9df588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reflex/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9df588

Please sign in to comment.