mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use "async def" in asyncio/tasks.pyi (#6783)
This commit is contained in:
@@ -230,27 +230,27 @@ def run_coroutine_threadsafe(coro: _FutureT[_T], loop: AbstractEventLoop) -> con
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def shield(arg: _FutureT[_T]) -> Future[_T]: ...
|
||||
def sleep(delay: float, result: _T = ...) -> Future[_T]: ...
|
||||
async def sleep(delay: float, result: _T = ...) -> _T: ...
|
||||
@overload
|
||||
def wait(fs: Iterable[_FT], *, timeout: float | None = ..., return_when: str = ...) -> Future[tuple[set[_FT], set[_FT]]]: ... # type: ignore[misc]
|
||||
async def wait(fs: Iterable[_FT], *, timeout: float | None = ..., return_when: str = ...) -> tuple[set[_FT], set[_FT]]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def wait(
|
||||
async def wait(
|
||||
fs: Iterable[Awaitable[_T]], *, timeout: float | None = ..., return_when: str = ...
|
||||
) -> Future[tuple[set[Task[_T]], set[Task[_T]]]]: ...
|
||||
def wait_for(fut: _FutureT[_T], timeout: float | None) -> Future[_T]: ...
|
||||
) -> tuple[set[Task[_T]], set[Task[_T]]]: ...
|
||||
async def wait_for(fut: _FutureT[_T], timeout: float | None) -> _T: ...
|
||||
|
||||
else:
|
||||
def shield(arg: _FutureT[_T], *, loop: AbstractEventLoop | None = ...) -> Future[_T]: ...
|
||||
def sleep(delay: float, result: _T = ..., *, loop: AbstractEventLoop | None = ...) -> Future[_T]: ...
|
||||
async def sleep(delay: float, result: _T = ..., *, loop: AbstractEventLoop | None = ...) -> _T: ...
|
||||
@overload
|
||||
def wait( # type: ignore[misc]
|
||||
async def wait( # type: ignore[misc]
|
||||
fs: Iterable[_FT], *, loop: AbstractEventLoop | None = ..., timeout: float | None = ..., return_when: str = ...
|
||||
) -> Future[tuple[set[_FT], set[_FT]]]: ...
|
||||
) -> tuple[set[_FT], set[_FT]]: ...
|
||||
@overload
|
||||
def wait(
|
||||
async def wait(
|
||||
fs: Iterable[Awaitable[_T]], *, loop: AbstractEventLoop | None = ..., timeout: float | None = ..., return_when: str = ...
|
||||
) -> Future[tuple[set[Task[_T]], set[Task[_T]]]]: ...
|
||||
def wait_for(fut: _FutureT[_T], timeout: float | None, *, loop: AbstractEventLoop | None = ...) -> Future[_T]: ...
|
||||
) -> tuple[set[Task[_T]], set[Task[_T]]]: ...
|
||||
async def wait_for(fut: _FutureT[_T], timeout: float | None, *, loop: AbstractEventLoop | None = ...) -> _T: ...
|
||||
|
||||
class Task(Future[_T], Generic[_T]):
|
||||
if sys.version_info >= (3, 8):
|
||||
|
||||
Reference in New Issue
Block a user