-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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 :)
There was a problem hiding this 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
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 phrase |
The sphinx-codeautolink extension is resilient, but it will not put links in these unparseable code snippets. |
Doc/howto/ipaddress.rst
Outdated
# do something | ||
... |
There was a problem hiding this comment.
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.
# do something | |
... | |
... # do something |
There was a problem hiding this comment.
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 reformat all the examples consistently; this PR only works on the places where there were parsing problems.
Fix problems in documentation example code snippets that prevent them from being parsed.
📚 Documentation preview 📚: https://cpython-previews--133906.org.readthedocs.build/