mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -43,9 +43,7 @@ _ProtocolFactory: TypeAlias = Callable[[], BaseProtocol]
|
||||
_SSLContext: TypeAlias = bool | None | ssl.SSLContext
|
||||
|
||||
class _TaskFactory(Protocol):
|
||||
def __call__(
|
||||
self, __loop: AbstractEventLoop, __factory: Coroutine[Any, Any, _T] | Generator[Any, None, _T]
|
||||
) -> Future[_T]: ...
|
||||
def __call__(self, loop: AbstractEventLoop, factory: Coroutine[Any, Any, _T] | Generator[Any, None, _T], /) -> Future[_T]: ...
|
||||
|
||||
class Handle:
|
||||
_cancelled: bool
|
||||
@@ -577,6 +575,6 @@ else:
|
||||
def get_child_watcher() -> AbstractChildWatcher: ...
|
||||
def set_child_watcher(watcher: AbstractChildWatcher) -> None: ...
|
||||
|
||||
def _set_running_loop(__loop: AbstractEventLoop | None) -> None: ...
|
||||
def _set_running_loop(loop: AbstractEventLoop | None, /) -> None: ...
|
||||
def _get_running_loop() -> AbstractEventLoop: ...
|
||||
def get_running_loop() -> AbstractEventLoop: ...
|
||||
|
||||
Reference in New Issue
Block a user