File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,13 @@ def args_match(
130
130
positional_arg_count , allowed_kwargs = arg_spec
131
131
match = True
132
132
for kwarg_name , kwarg_val in kwargs .items ():
133
- if (allowed_kwargs is AnyArg and allowable_keyword_arg_name (kwarg_name )) or (
134
- allowed_kwargs is not AnyArg and kwarg_name in allowed_kwargs
133
+ if (isinstance ( allowed_kwargs , AnyArgType ) and allowable_keyword_arg_name (kwarg_name )) or (
134
+ not isinstance ( allowed_kwargs , AnyArgType ) and kwarg_name in allowed_kwargs
135
135
):
136
136
sanitized_kwargs [kwarg_name ] = kwarg_val
137
137
else :
138
138
errors .append (TypeError (f"{ function_name } () got an unexpected keyword argument '{ kwarg_name } '" ))
139
- if positional_arg_count is AnyArg :
139
+ if isinstance ( positional_arg_count , AnyArgType ) :
140
140
sanitized_args = args
141
141
else :
142
142
sanitized_args = tuple (args [0 :positional_arg_count ])
You can’t perform that action at this time.
0 commit comments