Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/3221.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added docstrings for :attr:`~trio.lowlevel.ParkingLot.broken_by` and :meth:`~trio._subprocess.HasFileno.fileno`.
1 change: 1 addition & 0 deletions src/trio/_core/_parking_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class ParkingLot:
# items
_parked: OrderedDict[Task, None] = attrs.field(factory=OrderedDict, init=False)
broken_by: list[Task] = attrs.field(factory=list, init=False)
"""The list of tasks that have broken this lot via :meth:`break_lot`."""

def __len__(self) -> int:
"""Returns the number of parked tasks."""
Expand Down
4 changes: 3 additions & 1 deletion src/trio/_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def pidfd_open(fd: int, flags: int) -> int:
class HasFileno(Protocol):
"""Represents any file-like object that has a file descriptor."""

def fileno(self) -> int: ...
def fileno(self) -> int:
"""Return the underlying file descriptor as an integer."""
...


@final
Expand Down
1 change: 0 additions & 1 deletion src/trio/_tests/_check_type_completeness.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"No docstring found for function \"trio._highlevel_socket.SocketStream.send_eof\"",
"No docstring found for function \"trio._highlevel_socket.SocketStream.receive_some\"",
"No docstring found for function \"trio._highlevel_socket.SocketStream.aclose\"",
"No docstring found for function \"trio._subprocess.HasFileno.fileno\"",
"No docstring found for class \"trio._sync.AsyncContextManagerMixin\"",
"No docstring found for function \"trio._sync._HasAcquireRelease.acquire\"",
"No docstring found for function \"trio._sync._HasAcquireRelease.release\"",
Expand Down
Loading