FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-107570: Argument Clinic: report errors on the offending line by serhiy-storchaka · Pull Request #155250 · python/cpython · GitHub

/ cpython Public

gh-107570: Argument Clinic: report errors on the offending line - #155250

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:clinic-error-lineno
Aug 19, 2026
Merged

gh-107570: Argument Clinic: report errors on the offending line#155250
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:clinic-error-lineno

Conversation

serhiy-storchaka commented Aug 5, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Errors raised while the docstring is checked were reported on the line which ends the clinic block:

Error in file 'p.c' on line 11:      # the "[clinic start generated code]*/" line
Docstring for 'm.f' does not have a summary line!

and errors raised while the code is generated were reported without a file name and a line number at all:

Error:
You cannot use optional groups ('[' and ']') unless all parameters are positional-only ('/').

Functions and parameters now record the line on which they are declared, and the function docstring records where it starts, so that such errors point at the offending line: the line which should have been left blank, the too long summary line, the first too long line of the docstring body, the second {parameters} marker, or the declaration of the function or the parameter.

Errors raised while the docstring is checked were reported on the line
which ends the clinic block, and errors raised while the code is generated
were reported without a file name and a line number at all.

Functions and parameters now record the line on which they are declared,
and the function docstring records where it starts, so that such errors
point at the offending line.
# Conflicts:
#	Tools/clinic/libclinic/parse_args.py
serhiy-storchaka merged commit 9b05395 into python:main Aug 19, 2026
60 checks passed
serhiy-storchaka deleted the clinic-error-lineno branch August 19, 2026 08:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL