mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Upgrade black version (#7089)
This commit is contained in:
@@ -15,6 +15,7 @@ class _ConnectionBase:
|
||||
def __init__(self, handle: SupportsIndex, readable: bool = ..., writable: bool = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, handle: int, readable: bool = ..., writable: bool = ...) -> None: ...
|
||||
|
||||
@property
|
||||
def closed(self) -> bool: ... # undocumented
|
||||
@property
|
||||
|
||||
@@ -33,6 +33,7 @@ class BaseContext:
|
||||
if sys.version_info >= (3, 8):
|
||||
@staticmethod
|
||||
def parent_process() -> BaseProcess | None: ...
|
||||
|
||||
@staticmethod
|
||||
def active_children() -> list[BaseProcess]: ...
|
||||
def cpu_count(self) -> int: ...
|
||||
@@ -113,6 +114,7 @@ class BaseContext:
|
||||
def get_context(self, method: Literal["spawn"]) -> SpawnContext: ...
|
||||
@overload
|
||||
def get_context(self, method: str) -> BaseContext: ...
|
||||
|
||||
def get_start_method(self, allow_none: bool = ...) -> str: ...
|
||||
def set_start_method(self, method: str | None, force: bool = ...) -> None: ...
|
||||
@property
|
||||
@@ -140,20 +142,25 @@ if sys.platform != "win32":
|
||||
_start_method: str
|
||||
@staticmethod
|
||||
def _Popen(process_obj: BaseProcess) -> Any: ...
|
||||
|
||||
class SpawnProcess(BaseProcess):
|
||||
_start_method: str
|
||||
@staticmethod
|
||||
def _Popen(process_obj: BaseProcess) -> SpawnProcess: ...
|
||||
|
||||
class ForkServerProcess(BaseProcess):
|
||||
_start_method: str
|
||||
@staticmethod
|
||||
def _Popen(process_obj: BaseProcess) -> Any: ...
|
||||
|
||||
class ForkContext(BaseContext):
|
||||
_name: str
|
||||
Process: type[ForkProcess]
|
||||
|
||||
class SpawnContext(BaseContext):
|
||||
_name: str
|
||||
Process: type[SpawnProcess]
|
||||
|
||||
class ForkServerContext(BaseContext):
|
||||
_name: str
|
||||
Process: type[ForkServerProcess]
|
||||
@@ -163,6 +170,7 @@ else:
|
||||
_start_method: str
|
||||
@staticmethod
|
||||
def _Popen(process_obj: BaseProcess) -> Any: ...
|
||||
|
||||
class SpawnContext(BaseContext):
|
||||
_name: str
|
||||
Process: type[SpawnProcess]
|
||||
|
||||
@@ -113,6 +113,7 @@ class RemoteError(Exception): ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
class SharedMemoryServer(Server): ...
|
||||
|
||||
class SharedMemoryManager(BaseManager):
|
||||
def get_server(self) -> SharedMemoryServer: ...
|
||||
def SharedMemory(self, size: int) -> _SharedMemory: ...
|
||||
|
||||
@@ -24,6 +24,7 @@ class ApplyResult(Generic[_T]):
|
||||
callback: Callable[[_T], None] | None,
|
||||
error_callback: Callable[[BaseException], None] | None,
|
||||
) -> None: ...
|
||||
|
||||
def get(self, timeout: float | None = ...) -> _T: ...
|
||||
def wait(self, timeout: float | None = ...) -> None: ...
|
||||
def ready(self) -> bool: ...
|
||||
@@ -59,6 +60,7 @@ class IMapIterator(Iterator[_T]):
|
||||
def __init__(self, pool: Pool) -> None: ...
|
||||
else:
|
||||
def __init__(self, cache: dict[int, IMapIterator[Any]]) -> None: ...
|
||||
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def next(self, timeout: float | None = ...) -> _T: ...
|
||||
def __next__(self, timeout: float | None = ...) -> _T: ...
|
||||
|
||||
@@ -22,6 +22,7 @@ class BaseProcess:
|
||||
if sys.version_info >= (3, 7):
|
||||
def kill(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
def join(self, timeout: float | None = ...) -> None: ...
|
||||
def is_alive(self) -> bool: ...
|
||||
@property
|
||||
|
||||
@@ -30,6 +30,7 @@ class SimpleQueue(Generic[_T]):
|
||||
def __init__(self, *, ctx: Any = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def close(self) -> None: ...
|
||||
|
||||
def empty(self) -> bool: ...
|
||||
def get(self) -> _T: ...
|
||||
def put(self, item: _T) -> None: ...
|
||||
|
||||
@@ -18,6 +18,7 @@ if sys.version_info >= (3, 8):
|
||||
def size(self) -> int: ...
|
||||
def close(self) -> None: ...
|
||||
def unlink(self) -> None: ...
|
||||
|
||||
class ShareableList(Generic[_SLT]):
|
||||
shm: SharedMemory
|
||||
def __init__(self, sequence: Iterable[_SLT] | None = ..., *, name: str | None = ...) -> None: ...
|
||||
|
||||
@@ -20,6 +20,7 @@ class Condition(AbstractContextManager[bool]):
|
||||
def notify(self, n: int = ...) -> None: ...
|
||||
else:
|
||||
def notify(self) -> None: ...
|
||||
|
||||
def notify_all(self) -> None: ...
|
||||
def wait(self, timeout: float | None = ...) -> bool: ...
|
||||
def wait_for(self, predicate: Callable[[], bool], timeout: float | None = ...) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user