Skip to content

Commit

Permalink
pythongh-114281: Remove incorrect type hints from asyncio.staggered (
Browse files Browse the repository at this point in the history
…python#114282)

Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
2 people authored and Glyphack committed Jan 27, 2024
1 parent cf6875c commit d0754cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
12 changes: 1 addition & 11 deletions Lib/asyncio/staggered.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,14 @@
__all__ = 'staggered_race',

import contextlib
import typing

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


async def staggered_race(
coro_fns: typing.Iterable[typing.Callable[[], typing.Awaitable]],
delay: typing.Optional[float],
*,
loop: events.AbstractEventLoop = None,
) -> typing.Tuple[
typing.Any,
typing.Optional[int],
typing.List[typing.Optional[Exception]]
]:
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove type hints from ``Lib/asyncio/staggered.py``.
The annotations in the `typeshed <https://github.com/python/typeshed>`__
project should be used instead.

0 comments on commit d0754cf

Please sign in to comment.