Skip to content

Sync all async defs in asyncio/tasks.pyi #6783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions stdlib/asyncio/tasks.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down