-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Docs: Fix Sphinx warnings in sys.rst #108106
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
Conversation
- Mark up named tuple attributes using :attr:`!member` - Remove links for external functions - io.BufferedIOBase has no 'buffer' attribute; remove the link and mark up using :attr:`!buffer`
GitHub does not cooperate today; I'll apply the suggested changes locally and push instead. |
Co-authored-by: Adam Turner <[email protected]>
@AA-Turner, I don't understand the Sphinx warning/failure; can it be a bug in Sphinx?
|
It seems to me the textwrap docs are incorrectly marked up. It textwrap.rst, it looks like diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst
index a150eefbf9..e2952ce3cc 100644
--- a/Doc/library/textwrap.rst
+++ b/Doc/library/textwrap.rst
@@ -60,7 +60,7 @@ functions should be good enough; otherwise, you should use an instance of
First the whitespace in *text* is collapsed (all whitespace is replaced by
single spaces). If the result fits in the *width*, it is returned.
Otherwise, enough words are dropped from the end so that the remaining words
- plus the :attr:`.placeholder` fit within :attr:`.width`::
+ plus the *placeholder* fit within *width*::
>>> textwrap.shorten("Hello world!", width=12)
'Hello world!'
|
Co-authored-by: Adam Turner <[email protected]>
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.
LGTM, thanks!
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 good!
A
Thanks for the reviews and suggestions, Adam and Alex! |
Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, @erlend-aasland, I could not cleanly backport this to |
GH-108166 is a backport of this pull request to the 3.11 branch. |
- Mark up named tuple attributes as attributes - Remove links for external functions - io.BufferedIOBase has no 'buffer' attribute; remove the link and mark up using :attr:`!buffer` - (Re)format some tables as bullet lists: - sys._emscripten_info - sys.hash_info - sys.int_info - sys.thread_info - In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes', add links to the frame objects reference. (cherry picked from commit 29fa7af) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
Docs: Fix Sphinx warnings in sys.rst (GH-108106) - Mark up named tuple attributes as attributes - Remove links for external functions - io.BufferedIOBase has no 'buffer' attribute; remove the link and mark up using :attr:`!buffer` - (Re)format some tables as bullet lists: - sys._emscripten_info - sys.hash_info - sys.int_info - sys.thread_info - In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes', add links to the frame objects reference. (cherry picked from commit 29fa7af) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
GH-108178 is a backport of this pull request to the 3.12 branch. |
(cherry picked from commit 29fa7af) - Mark up named tuple attributes as attributes - Remove links for external functions - io.BufferedIOBase has no 'buffer' attribute; remove the link and mark up using :attr:`!buffer` - (Re)format some tables as bullet lists: - sys._emscripten_info - sys.hash_info - sys.int_info - sys.thread_info - In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes', add links to the frame objects reference. Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
(cherry picked from commit 29fa7af) - Mark up named tuple attributes as attributes - Remove links for external functions - io.BufferedIOBase has no 'buffer' attribute; remove the link and mark up using :attr:`!buffer` - (Re)format some tables as bullet lists: - sys._emscripten_info - sys.hash_info - sys.int_info - sys.thread_info - In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes', add links to the frame objects reference. Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
.. attribute:: member
:attr:`!buffer`
📚 Documentation preview 📚: https://cpython-previews--108106.org.readthedocs.build/