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-133905: Fix parsing problems in example code#133906

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

Open
cmarqu wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromcmarqu:gh-133905

Conversation

cmarqu
Copy link

@cmarqucmarqu commentedMay 11, 2025
edited
Loading

Fix problems in documentation example code snippets that prevent them from being parsed.


📚 Documentation preview 📚:https://cpython-previews--133906.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-botbot commentedMay 11, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

Great catch! Thank you!

We should totally add some plugin to parse our examples in the docs.

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

Looks much better to me! Let's wait for other opinions :)

Copy link
Member

@AA-TurnerAA-Turner 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 sure about this. Some of these clearly read better to me without the changes in this PR. I'm also hesistant that the motivation here is just to introduce a third party tool, whereas that tool could just be made more resilient.

A

@bedevere-app
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@cmarqu
Copy link
Author

The sphinx-codeautolink extension is resilient, but it will not put links in these unparseable code snippets.
The warnings it would produce by default can be handled easily with Sphinx'suppress_warnings.

Comment on lines 257 to 258
# do something
...
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer a single line here and for most of the examples. Could do the revision with sed.

Suggested change
# do something
...
... # do something

Copy link
Author

@cmarqucmarquMay 14, 2025
edited
Loading

Choose a reason for hiding this comment

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

Oops, there was indeed one such occurrence left, fixed. A follow-up PR could reformatall the examples consistently; this PR only works on the places where there were parsing problems.

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

@terryjreedyterryjreedyterryjreedy left review comments

@AA-TurnerAA-TurnerAA-Turner requested changes

@sobolevnsobolevnsobolevn approved these changes

Assignees
No one assigned
Labels
awaiting changesdocsDocumentation in the Doc dirskip news
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@cmarqu@sobolevn@AA-Turner@terryjreedy

[8]ページ先頭

©2009-2025 Movatter.jp