@@ -32,6 +32,11 @@ def ensure_future(coro_or_future: _FutureT[_T],
32
32
* , loop : Optional [AbstractEventLoop ] = ...) -> Future [_T ]: ...
33
33
# Prior to Python 3.7 'async' was an alias for 'ensure_future'.
34
34
# It became a keyword in 3.7.
35
+
36
+ # `gather()` actually returns a list with length equal to the number
37
+ # of tasks passed; however, Tuple is used similar to the annotation for
38
+ # zip() because typing does not support variadic type variables. See
39
+ # typing PR #1550 for discussion.
35
40
@overload
36
41
def gather (coro_or_future1 : _FutureT [_T1 ],
37
42
* , loop : Optional [AbstractEventLoop ] = ..., return_exceptions : Literal [False ] = ...) -> Future [Tuple [_T1 ]]: ...
@@ -56,7 +61,7 @@ def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_
56
61
def gather (coro_or_future1 : _FutureT [Any ], coro_or_future2 : _FutureT [Any ], coro_or_future3 : _FutureT [Any ],
57
62
coro_or_future4 : _FutureT [Any ], coro_or_future5 : _FutureT [Any ], coro_or_future6 : _FutureT [Any ],
58
63
* coros_or_futures : _FutureT [Any ],
59
- loop : Optional [AbstractEventLoop ] = ..., return_exceptions : bool = ...) -> Future [Tuple [Any , ... ]]: ...
64
+ loop : Optional [AbstractEventLoop ] = ..., return_exceptions : bool = ...) -> Future [List [Any ]]: ...
60
65
@overload
61
66
def gather (coro_or_future1 : _FutureT [_T1 ],
62
67
* , loop : Optional [AbstractEventLoop ] = ...,
0 commit comments