-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Docs: Fix Sphinx warnings in io.rst #107903
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
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.
Some minor comments:
A
Doc/library/io.rst
Outdated
@@ -215,7 +215,7 @@ High-level Module Interface | |||
return f.read() | |||
|
|||
In this example, an :class:`EncodingWarning` is emitted for the caller of | |||
``read_text()``. | |||
:meth:`!read_text`. |
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 think this should stay as read_text()
; it refers to the exemplar function defined immediatley above and not to any object description.
:meth:`!read_text`. | |
``read_text()`` |
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 agree. I had an earlier variant where I converted these to the meth markup, but I changed my mind. Probably forgot to revert this one. Thanks for noticing.
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.
Did you change your mind on this one? xref 348c115
Co-authored-by: Adam Turner <[email protected]>
Let's land some of the other changes first; for example documenting |
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.
Only comment is on read_text
(replied to the earlier thread), otherwise looks good!
Thanks for the review! |
Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
GH-108093 is a backport of this pull request to the 3.12 branch. |
- Mark up parameter and argument names properly - If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc. (cherry picked from commit 5c76899) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]>
GH-108094 is a backport of this pull request to the 3.11 branch. |
- Mark up parameter and argument names properly - If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc. (cherry picked from commit 5c76899) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]>
- Mark up parameter and argument names properly - If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc. (cherry picked from commit 5c76899) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]>
Docs: Fix Sphinx warnings in io.rst (GH-107903) - Mark up parameter and argument names properly - If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc. (cherry picked from commit 5c76899) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: T. Wouters <[email protected]>
seek
,tell
,write
,read
, etc. Else, remove the (already dead) link.📚 Documentation preview 📚: https://cpython-previews--107903.org.readthedocs.build/