From b8f2eb3930272cfa10e4430c7fabe5148b98ed11 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 5 Apr 2022 07:35:00 +0100 Subject: [PATCH] Make several fields on `_dummy_threading` classes read-only properties (#7588) --- stdlib/_dummy_threading.pyi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/stdlib/_dummy_threading.pyi b/stdlib/_dummy_threading.pyi index 630ca3392..1cbb8f1ee 100644 --- a/stdlib/_dummy_threading.pyi +++ b/stdlib/_dummy_threading.pyi @@ -80,8 +80,9 @@ class local: class Thread: name: str - ident: int | None daemon: bool + @property + def ident(self) -> int | None: ... def __init__( self, group: None = ..., @@ -183,9 +184,12 @@ class Timer(Thread): def cancel(self) -> None: ... class Barrier: - parties: int - n_waiting: int - broken: bool + @property + def parties(self) -> int: ... + @property + def n_waiting(self) -> int: ... + @property + def broken(self) -> bool: ... def __init__(self, parties: int, action: Callable[[], None] | None = ..., timeout: float | None = ...) -> None: ... def wait(self, timeout: float | None = ...) -> int: ... def reset(self) -> None: ...