diff options
author | neonene <53406459+neonene@users.noreply.github.com> | 2024-04-16 09:52:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 09:52:45 (GMT) |
commit | c520bf9bdf77d43c3d5d95bd08e856759a2abc86 (patch) | |
tree | 9b488b1b76dd1320ddcd9597c7e8620659c45161 /Tools | |
parent | 1316692e8c7c1e1f3b6639e51804f9db5ed892ea (diff) | |
download | cpython-c520bf9bdf77d43c3d5d95bd08e856759a2abc86.zip cpython-c520bf9bdf77d43c3d5d95bd08e856759a2abc86.tar.gz cpython-c520bf9bdf77d43c3d5d95bd08e856759a2abc86.tar.bz2 |
gh-117613: Argument Clinic: ensure that 'defining_class' params are positional-only (#117781)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/clinic/libclinic/dsl_parser.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tools/clinic/libclinic/dsl_parser.py b/Tools/clinic/libclinic/dsl_parser.py index 9e22d84..56c6dca 100644 --- a/Tools/clinic/libclinic/dsl_parser.py +++ b/Tools/clinic/libclinic/dsl_parser.py @@ -1102,6 +1102,7 @@ class DSLParser: fail("A 'defining_class' parameter cannot have a default value.") if self.group: fail("A 'defining_class' parameter cannot be in an optional group.") + kind = inspect.Parameter.POSITIONAL_ONLY else: fail("A 'defining_class' parameter, if specified, must either " "be the first thing in the parameter block, or come just " |