8000 gh-104683: Modernise `Tools/clinic/` using pyupgrade by AlexWaygood · Pull Request #104684 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104683: Modernise Tools/clinic/ using pyupgrade #104684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert a change that made it less readable
  • Loading branch information
AlexWaygood committed May 20, 2023
commit bb5bcf22bb1c82ef1c86440e9534ef7f876e6a59
4 changes: 2 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,14 +1070,14 @@ def parser_body(prototype, *fields, declarations=''):
else:
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", "{}, {}, {}".format(
args_declaration = "_PyArg_UnpackKeywords", "%s, %s, %s" % (
min_pos,
max_pos,
min_kw_only
)
nargs = "nargs"
else:
args_declaration = "_PyArg_UnpackKeywordsWithVararg", "{}, {}, {}, {}".format(
args_declaration = "_PyArg_UnpackKeywordsWithVararg", "%s, %s, %s, %s" % (
min_pos,
max_pos,
min_kw_only,
Expand Down
0