mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Avoid unnecessary forward refs in class definitions (#10124)
This commit is contained in:
@@ -14,9 +14,6 @@ class Barrier(threading.Barrier):
|
||||
self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *ctx: BaseContext
|
||||
) -> None: ...
|
||||
|
||||
class BoundedSemaphore(Semaphore):
|
||||
def __init__(self, value: int = 1, *, ctx: BaseContext) -> None: ...
|
||||
|
||||
class Condition(AbstractContextManager[bool]):
|
||||
def __init__(self, lock: _LockLike | None = None, *, ctx: BaseContext) -> None: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
@@ -36,6 +33,14 @@ class Event:
|
||||
def clear(self) -> None: ...
|
||||
def wait(self, timeout: float | None = None) -> bool: ...
|
||||
|
||||
# Not part of public API
|
||||
class SemLock(AbstractContextManager[bool]):
|
||||
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def __exit__(
|
||||
self, __exc_type: type[BaseException] | None, __exc_val: BaseException | None, __exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class Lock(SemLock):
|
||||
def __init__(self, *, ctx: BaseContext) -> None: ...
|
||||
|
||||
@@ -45,10 +50,5 @@ class RLock(SemLock):
|
||||
class Semaphore(SemLock):
|
||||
def __init__(self, value: int = 1, *, ctx: BaseContext) -> None: ...
|
||||
|
||||
# Not part of public API
|
||||
class SemLock(AbstractContextManager[bool]):
|
||||
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def __exit__(
|
||||
self, __exc_type: type[BaseException] | None, __exc_val: BaseException | None, __exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
class BoundedSemaphore(Semaphore):
|
||||
def __init__(self, value: int = 1, *, ctx: BaseContext) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user