mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -72,7 +72,7 @@ def synchronized(obj: ctypes.Array[_CT], lock: _LockLike | None = None, ctx: Any
|
||||
def synchronized(obj: _CT, lock: _LockLike | None = None, ctx: Any | None = None) -> SynchronizedBase[_CT]: ...
|
||||
|
||||
class _AcquireFunc(Protocol):
|
||||
def __call__(self, __block: bool = ..., __timeout: float | None = ...) -> bool: ...
|
||||
def __call__(self, block: bool = ..., timeout: float | None = ..., /) -> bool: ...
|
||||
|
||||
class SynchronizedBase(Generic[_CT]):
|
||||
acquire: _AcquireFunc
|
||||
@@ -83,7 +83,7 @@ class SynchronizedBase(Generic[_CT]):
|
||||
def get_lock(self) -> _LockLike: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(
|
||||
self, __exc_type: type[BaseException] | None, __exc_val: BaseException | None, __exc_tb: TracebackType | None
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
|
||||
) -> None: ...
|
||||
|
||||
class Synchronized(SynchronizedBase[_SimpleCData[_T]], Generic[_T]):
|
||||
|
||||
Reference in New Issue
Block a user