docs: add missing docstrings to MemorySendChannel, MemoryReceiveChannel, MemoryChannelStatistics, SocketStream methods#3445
Closed
sridhar-3009 wants to merge 2 commits into
Conversation
…am methods Several public classes and methods were missing docstrings, causing them to show up as undocumented in the API reference. - MemoryChannelStatistics: add class-level docstring with field descriptions - MemorySendChannel: add class-level docstring - MemoryReceiveChannel: add class-level docstring - SocketStream.send_all: add one-line docstring referencing the ABC - SocketStream.wait_send_all_might_not_block: add docstring - SocketStream.send_eof: add docstring - SocketStream.receive_some: add docstring - SocketStream.aclose: add docstring Contributes to python-trio#3221
A5rocks
requested changes
May 30, 2026
Contributor
A5rocks
left a comment
There was a problem hiding this comment.
Please fix CI! Btw if you respond with a LLM generated comment I'll close this PR.
| return await self.socket.recv(max_bytes) | ||
|
|
||
| async def aclose(self) -> None: | ||
| """See :meth:`trio.abc.AsyncResource.aclose`.""" |
Contributor
There was a problem hiding this comment.
IIRC this is because of how we configured the autoclass. Can we do that instead?
Author
@A5rocks go ahead and close it 😃 |
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.
Summary
Contributes to #3221.
Adds docstrings to 8 items listed as missing in the issue:
MemoryChannelStatisticsclass_channel.pyMemorySendChannelclass_channel.pyMemoryReceiveChannelclass_channel.pySocketStream.send_all_highlevel_socket.pySocketStream.wait_send_all_might_not_block_highlevel_socket.pySocketStream.send_eof_highlevel_socket.pySocketStream.receive_some_highlevel_socket.pySocketStream.aclose_highlevel_socket.pyThe
SocketStreammethods use the standard one-linerSee :meth:...`` pattern pointing to the ABC definition (same style used by other stream implementations in trio). The channel classes get descriptive class-level docstrings.trio.lowlevel.ParkingLot.broken_byandtrio._subprocess.HasFileno.filenoare left for a follow-up as they require reading private/subprocess internals.