diff --git a/stdlib/threading.pyi b/stdlib/threading.pyi index bbd131982..2c448ff3a 100644 --- a/stdlib/threading.pyi +++ b/stdlib/threading.pyi @@ -66,7 +66,8 @@ class Thread: def isDaemon(self) -> bool: ... def setDaemon(self, daemonic: bool) -> None: ... -class _DummyThread(Thread): ... +class _DummyThread(Thread): + def __init__(self) -> None: ... class Lock: def __init__(self) -> None: ... @@ -80,12 +81,12 @@ class Lock: class _RLock: def __init__(self) -> None: ... - def __enter__(self) -> bool: ... + def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... + def release(self) -> None: ... + __enter__ = acquire def __exit__( self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None ) -> bool | None: ... - def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... - def release(self) -> None: ... RLock = _RLock