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(
130130 positional_arg_count , allowed_kwargs = arg_spec
131131 match = True
132132 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
135135 ):
136136 sanitized_kwargs [kwarg_name ] = kwarg_val
137137 else :
138138 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 ) :
140140 sanitized_args = args
141141 else :
142142 sanitized_args = tuple (args [0 :positional_arg_count ])
You can’t perform that action at this time.
0 commit comments