Skip to content

Commit b8f2eb3

Browse files
authored
Make several fields on _dummy_threading classes read-only properties (#7588)
1 parent 414f324 commit b8f2eb3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

stdlib/_dummy_threading.pyi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ class local:
8080

8181
class Thread:
8282
name: str
83-
ident: int | None
8483
daemon: bool
84+
@property
85+
def ident(self) -> int | None: ...
8586
def __init__(
8687
self,
8788
group: None = ...,
@@ -183,9 +184,12 @@ class Timer(Thread):
183184
def cancel(self) -> None: ...
184185

185186
class Barrier:
186-
parties: int
187-
n_waiting: int
188-
broken: bool
187+
@property
188+
def parties(self) -> int: ...
189+
@property
190+
def n_waiting(self) -> int: ...
191+
@property
192+
def broken(self) -> bool: ...
189193
def __init__(self, parties: int, action: Callable[[], None] | None = ..., timeout: float | None = ...) -> None: ...
190194
def wait(self, timeout: float | None = ...) -> int: ...
191195
def reset(self) -> None: ...

0 commit comments

Comments
 (0)