We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26a6b87 commit c46ed0dCopy full SHA for c46ed0d
Tools/clinic/libclinic/dsl_parser.py
@@ -927,8 +927,11 @@ def parse_parameter(self, line: str) -> None:
927
# (var-positional), then we allow ``**kwds`` (var-keyword).
928
# Currently, pos-or-keyword or keyword-only arguments are not
929
# allowed with the ``**kwds`` converter.
930
- if not all(p.is_positional_only() or p.is_vararg()
931
- for p in self.function.parameters.values()):
+ has_non_positional_param = any(
+ p.is_positional_or_keyword() or p.is_keyword_only()
932
+ for p in self.function.parameters.values()
933
+ )
934
+ if has_non_positional_param:
935
fail(f"Function {self.function.name!r} has an "
936
f"invalid parameter declaration (**kwargs?): {line!r}")
937
is_var_keyword = True
0 commit comments