Skip to content

Commit

Permalink
Do not generate unused noptargs
Browse files Browse the repository at this point in the history
  • Loading branch information
colorfulappl committed Nov 24, 2022
1 parent a48971d commit e6a4e13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Modules/clinic/_testclinic.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ def parser_body(prototype, *fields, declarations=''):
parser_definition = parser_body(parser_prototype, *parser_code)

else:
has_optional_kw = (max(pos_only, min_pos) + min_kw_only < len(converters))
has_optional_kw = (max(pos_only, min_pos) + min_kw_only < len(converters) - int(vararg != NO_VARARG))
if vararg == NO_VARARG:
args_declaration = "_PyArg_UnpackKeywords", "%s, %s, %s" % (
min_pos,
Expand Down

0 comments on commit e6a4e13

Please sign in to comment.