mirror of
https://github.com/python/cpython.git
synced 2025-12-08 18:32:16 +00:00
gh-114281: Remove incorrect type hints from asyncio.staggered (#114282)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
1d6d5e854c
commit
0554a9594e
2 changed files with 4 additions and 11 deletions
|
|
@ -3,7 +3,6 @@
|
||||||
__all__ = 'staggered_race',
|
__all__ = 'staggered_race',
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import typing
|
|
||||||
|
|
||||||
from . import events
|
from . import events
|
||||||
from . import exceptions as exceptions_mod
|
from . import exceptions as exceptions_mod
|
||||||
|
|
@ -11,16 +10,7 @@ from . import locks
|
||||||
from . import tasks
|
from . import tasks
|
||||||
|
|
||||||
|
|
||||||
async def staggered_race(
|
async def staggered_race(coro_fns, delay, *, loop=None):
|
||||||
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]]
|
|
||||||
]:
|
|
||||||
"""Run coroutines with staggered start times and take the first to finish.
|
"""Run coroutines with staggered start times and take the first to finish.
|
||||||
|
|
||||||
This method takes an iterable of coroutine functions. The first one is
|
This method takes an iterable of coroutine functions. The first one is
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue