Skip to content

Commit 818f3ee

Browse files
committed
Small type fix
1 parent 28b8bfa commit 818f3ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fluent_compiler/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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])

0 commit comments

Comments
 (0)