Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-128152: Argument Clinic: don't parse CPP directives inside C comments#128464

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedJan 3, 2025
edited
Loading

Resolves#128152

@erlend-aaslanderlend-aasland changed the titleclinic/empty commentsgh-128152: Argument Clinic: don't parse CPP directives inside C commentsJan 3, 2025
@erlend-aaslanderlend-aasland added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsJan 3, 2025
Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not an expert in AC but this looks good. At least, I can now use empty lines inpython input. By the way, I think I've just understood thatCPP stands for Clinic Pre-Processor/Processing and not for C++....

erlend-aasland reacted with laugh emoji
@erlend-aasland
Copy link
ContributorAuthor

I can now use empty lines inpython input

Yes,# prefixed lines are now correctly passed on as Python code. Forclinic input blocks, they are correctly ignored as "Clinic comments":

defvalid_line(self,line:str)->bool:
# ignore comment-only lines
ifline.lstrip().startswith('#'):
returnFalse

@erlend-aasland
Copy link
ContributorAuthor

erlend-aasland commentedJan 3, 2025
edited
Loading

Thanks for the quick review! I'll land this tomorrow.

@erlend-aaslanderlend-aasland self-assigned thisJan 3, 2025
@erlend-aaslanderlend-aasland merged commita4e773c intopython:mainJan 4, 2025
52 checks passed
@erlend-aaslanderlend-aasland deleted the clinic/empty-comments branchJanuary 4, 2025 10:46
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 4, 2025
…ide C comments (pythonGH-128464)(cherry picked from commita4e773c)Co-authored-by: Erlend E. Aasland <erlend@python.org>
@miss-islington-app

This comment was marked as outdated.

@bedevere-app
Copy link

GH-128478 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJan 4, 2025
@erlend-aaslanderlend-aasland removed the needs backport to 3.12only security fixes labelJan 4, 2025
erlend-aasland added a commit that referenced this pull requestJan 4, 2025
…side C comments (GH-128464) (#128478)(cherry picked from commita4e773c)Co-authored-by: Erlend E. Aasland <erlend@python.org>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 6, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz approved these changes

Assignees

@erlend-aaslanderlend-aasland

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Argument Clinic's[python input] blocks do not support empty lines in comments

2 participants

@erlend-aasland@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp