mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
A new shade of Black (#11362)
This commit is contained in:
@@ -25,6 +25,7 @@ if sys.version_info >= (3, 11):
|
||||
STATE_CON_MADE: str
|
||||
STATE_EOF: str
|
||||
STATE_CON_LOST: str
|
||||
|
||||
def add_flowcontrol_defaults(high: int | None, low: int | None, kb: int) -> tuple[int, int]: ...
|
||||
|
||||
else:
|
||||
|
||||
@@ -96,6 +96,7 @@ if sys.platform != "win32":
|
||||
def __exit__(self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None) -> None: ...
|
||||
def add_child_handler(self, pid: int, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> None: ...
|
||||
def remove_child_handler(self, pid: int) -> bool: ...
|
||||
|
||||
else:
|
||||
class SafeChildWatcher(BaseChildWatcher):
|
||||
def __enter__(self) -> Self: ...
|
||||
@@ -120,6 +121,7 @@ if sys.platform != "win32":
|
||||
else:
|
||||
def get_child_watcher(self) -> AbstractChildWatcher: ...
|
||||
def set_child_watcher(self, watcher: AbstractChildWatcher | None) -> None: ...
|
||||
|
||||
SelectorEventLoop = _UnixSelectorEventLoop
|
||||
|
||||
DefaultEventLoopPolicy = _UnixDefaultEventLoopPolicy
|
||||
@@ -136,6 +138,7 @@ if sys.platform != "win32":
|
||||
def add_child_handler(self, pid: int, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> None: ...
|
||||
def remove_child_handler(self, pid: int) -> bool: ...
|
||||
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
||||
|
||||
else:
|
||||
class MultiLoopChildWatcher(AbstractChildWatcher):
|
||||
def is_active(self) -> bool: ...
|
||||
|
||||
@@ -69,6 +69,7 @@ if sys.platform == "win32":
|
||||
def recvfrom_into(
|
||||
self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0
|
||||
) -> futures.Future[tuple[int, socket._RetAddress]]: ...
|
||||
|
||||
SelectorEventLoop = _WindowsSelectorEventLoop
|
||||
|
||||
class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
|
||||
@@ -80,4 +81,5 @@ if sys.platform == "win32":
|
||||
_loop_factory: ClassVar[type[ProactorEventLoop]]
|
||||
def get_child_watcher(self) -> NoReturn: ...
|
||||
def set_child_watcher(self, watcher: Any) -> NoReturn: ...
|
||||
|
||||
DefaultEventLoopPolicy = WindowsSelectorEventLoopPolicy
|
||||
|
||||
Reference in New Issue
Block a user