File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 3
3
__all__ = 'staggered_race' ,
4
4
5
5
import contextlib
6
- import typing
6
+ from collections .abc import Awaitable , Callable , Iterable
7
+ from typing import Any
7
8
8
9
from . import events
9
10
from . import exceptions as exceptions_mod
12
13
13
14
14
15
async def staggered_race (
15
- coro_fns : typing . Iterable [typing . Callable [[], typing . Awaitable ]],
16
- delay : typing . Optional [ float ] ,
16
+ coro_fns : Iterable [Callable [[], Awaitable [ Any ] ]],
17
+ delay : float | None ,
17
18
* ,
18
- loop : events .AbstractEventLoop = None ,
19
- ) -> typing . Tuple [
20
- typing . Any ,
21
- typing . Optional [ int ] ,
22
- typing . List [ typing . Optional [ Exception ] ]
19
+ loop : events .AbstractEventLoop | None = None ,
20
+ ) -> tuple [
21
+ Any ,
22
+ int | None ,
23
+ list [ Exception | None ]
23
24
]:
24
25
"""Run coroutines with staggered start times and take the first to finish.
25
26
You can’t perform that action at this time.
0 commit comments