Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove type annotations from asyncio.staggered
  • Loading branch information
sobolevn committed Jan 20, 2024
commit 2ea1eda62b471a6e072e269ae4f74653e47f9714
13 changes: 1 addition & 12 deletions Lib/asyncio/staggered.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@
__all__ = 'staggered_race',

import contextlib
from collections.abc import Awaitable, Callable, Iterable
from typing import Any

from . import events
from . import exceptions as exceptions_mod
from . import locks
from . import tasks


async def staggered_race(
coro_fns: Iterable[Callable[[], Awaitable[Any]]],
delay: float | None,
*,
loop: events.AbstractEventLoop | None = None,
) -> tuple[
Any,
int | None,
list[Exception | None]
]:
async def staggered_race(coro_fns, delay, *, loop=None):
"""Run coroutines with staggered start times and take the first to finish.

This method takes an iterable of coroutine functions. The first one is
Expand Down