Skip to content

gh-155228: Check the length of parameter descriptions in Argument Clinic - #155251

Open
ghostiee-11 wants to merge 2 commits into
python:mainfrom
ghostiee-11:gh-155228-clinic-param-width
Open

gh-155228: Check the length of parameter descriptions in Argument Clinic#155251
ghostiee-11 wants to merge 2 commits into
python:mainfrom
ghostiee-11:gh-155228-clinic-param-width

Conversation

@ghostiee-11

@ghostiee-11 ghostiee-11 commented Aug 5, 2026

Copy link
Copy Markdown

Measure parameter description lines in the docstring width check and rewrap the 30 functions in the tree that exceeded their limit.

…nt Clinic

The docstring line width check ran before the {parameters} block was
substituted into the docstring, so parameter descriptions of any length
were accepted without a warning. This was a leftover of pythongh-150285, and
was easiest to miss for cloned functions, which inherit the parameter
descriptions of the function they clone.

Measure the rendered parameter description lines as part of the docstring
body, taking the indentation of the {parameters} marker into account, and
rewrap the 30 functions in the tree whose descriptions exceeded their
limit. The width warnings now also report the file they come from.

The issue lists 24 functions; the check reports 30. Three of the listed
functions (bytes.decode, bytearray.decode and winreg.ConnectRegistry) are
1 to 5 characters under their limit on this commit and are left unchanged.
@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant