Skip to content

Commit b080d96

Browse files
author
nightcityblade
committed
docs: address review feedback on missing docstrings
1 parent 54c94dd commit b080d96

4 files changed

Lines changed: 2 additions & 22 deletions

File tree

docs/source/reference-io.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ abstraction.
218218

219219
.. autoclass:: SocketStream
220220
:members:
221-
:undoc-members:
222221
:show-inheritance:
223222

224223
.. autoclass:: SocketListener

src/trio/_channel.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,6 @@ class MemoryChannelStatistics:
122122
123123
Returned by :meth:`MemorySendChannel.statistics` and
124124
:meth:`MemoryReceiveChannel.statistics`.
125-
126-
Attributes:
127-
current_buffer_used: The number of items currently buffered in the channel.
128-
max_buffer_size: The maximum number of items that can be buffered.
129-
open_send_channels: The number of open
130-
:class:`MemorySendChannel` endpoints.
131-
open_receive_channels: The number of open
132-
:class:`MemoryReceiveChannel` endpoints.
133-
tasks_waiting_send: The number of tasks waiting to send.
134-
tasks_waiting_receive: The number of tasks waiting to receive.
135125
"""
136126

137127
current_buffer_used: int
@@ -171,8 +161,7 @@ class MemorySendChannel(SendChannel[SendType], metaclass=NoPublicConstructor):
171161
"""The send end of a memory channel, created by
172162
:func:`open_memory_channel`.
173163
174-
See :ref:`channels` for details. This implements the
175-
:class:`trio.abc.SendChannel` interface.
164+
See :ref:`channels` for details.
176165
177166
"""
178167

@@ -327,8 +316,7 @@ class MemoryReceiveChannel(ReceiveChannel[ReceiveType], metaclass=NoPublicConstr
327316
"""The receive end of a memory channel, created by
328317
:func:`open_memory_channel`.
329318
330-
See :ref:`channels` for details. This implements the
331-
:class:`trio.abc.ReceiveChannel` interface.
319+
See :ref:`channels` for details.
332320
333321
"""
334322

src/trio/_core/_parking_lot.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ class ParkingLot:
152152
# items
153153
_parked: OrderedDict[Task, None] = attrs.field(factory=OrderedDict, init=False)
154154
broken_by: list[Task] = attrs.field(factory=list, init=False)
155-
"""List of tasks that have broken this parking lot via
156-
:meth:`break_lot`. An empty list if the lot has not been broken."""
157155

158156
def __len__(self) -> int:
159157
"""Returns the number of parked tasks."""

src/trio/_highlevel_socket.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def __init__(self, socket: SocketType) -> None:
107107
self.setsockopt(tsocket.IPPROTO_TCP, tsocket.TCP_NOTSENT_LOWAT, 2**14)
108108

109109
async def send_all(self, data: bytes | bytearray | memoryview) -> None:
110-
"""See :meth:`trio.abc.SendStream.send_all`."""
111110
if self.socket.did_shutdown_SHUT_WR:
112111
raise trio.ClosedResourceError("can't send data after sending EOF")
113112
with self._send_conflict_detector:
@@ -125,15 +124,13 @@ async def send_all(self, data: bytes | bytearray | memoryview) -> None:
125124
total_sent += sent
126125

127126
async def wait_send_all_might_not_block(self) -> None:
128-
"""See :meth:`trio.abc.SendStream.wait_send_all_might_not_block`."""
129127
with self._send_conflict_detector:
130128
if self.socket.fileno() == -1:
131129
raise trio.ClosedResourceError
132130
with _translate_socket_errors_to_stream_errors():
133131
await self.socket.wait_writable()
134132

135133
async def send_eof(self) -> None:
136-
"""See :meth:`trio.abc.HalfCloseableStream.send_eof`."""
137134
with self._send_conflict_detector:
138135
await trio.lowlevel.checkpoint()
139136
# On macOS, calling shutdown a second time raises ENOTCONN, but
@@ -144,7 +141,6 @@ async def send_eof(self) -> None:
144141
self.socket.shutdown(tsocket.SHUT_WR)
145142

146143
async def receive_some(self, max_bytes: int | None = None) -> bytes:
147-
"""See :meth:`trio.abc.ReceiveStream.receive_some`."""
148144
if max_bytes is None:
149145
max_bytes = DEFAULT_RECEIVE_SIZE
150146
if max_bytes < 1:
@@ -153,7 +149,6 @@ async def receive_some(self, max_bytes: int | None = None) -> bytes:
153149
return await self.socket.recv(max_bytes)
154150

155151
async def aclose(self) -> None:
156-
"""See :meth:`trio.abc.AsyncResource.aclose`."""
157152
self.socket.close()
158153
await trio.lowlevel.checkpoint()
159154

0 commit comments

Comments
 (0)