gh-89554: Document socket.SocketType as a class#150683
Open
gaborbernat wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
For context, I am aware of gh-88427 (the |
Documentation build overview
|
…cription socket.SocketType is a class (re-exported from _socket as an alias of _socket.socket, the base class of socket.socket), but was documented with the ".. data::" directive, so ":class:" cross-references to it cannot resolve against a py:class target. Switch the entry to ".. class::", and correct the description: SocketType is the base class of the socket type, not "type(socket(...))" (which is socket.socket). This addresses the misleading wording reported in pythongh-88427.
79787b0 to
0ad690a
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
socket.SocketTypeis a class, but the documentation marks it with the.. data::directive, so:class:cross-references to it cannot resolve against a py:class target.This switches the entry to
.. class::. It also corrects the description:SocketTypeis re-exported from_socketas an alias of_socket.socket, the base class ofsocket.socket, soisinstance(socket(...), SocketType)is true whiletype(socket(...))issocket.socketitself. The current wording, "the same astype(socket(...))", is the misleading text reported in gh-88427.This overlaps with #93288, which corrects the same sentence but keeps
.. data::. This PR combines that wording fix with the role fix.Refs: gh-89554, gh-88427. Documentation-only change, so no
Misc/NEWSentry (skip news).This file is not covered by CODEOWNERS, so cc @vstinner, who reviews most socket changes.