8686 ) -> Iterator [Future [_T ]]: ...
8787
8888@overload
89- def ensure_future (coro_or_future : _FT , * , loop : AbstractEventLoop | None = None ) -> _FT : ... # type: ignore[misc ]
89+ def ensure_future (coro_or_future : _FT , * , loop : AbstractEventLoop | None = None ) -> _FT : ... # type: ignore[overload-overlap ]
9090@overload
9191def ensure_future (coro_or_future : Awaitable [_T ], * , loop : AbstractEventLoop | None = None ) -> Task [_T ]: ...
9292
@@ -95,25 +95,24 @@ def ensure_future(coro_or_future: Awaitable[_T], *, loop: AbstractEventLoop | No
9595# zip() because typing does not support variadic type variables. See
9696# typing PR #1550 for discussion.
9797#
98- # The many type: ignores here are because the overloads overlap,
99- # but having overlapping overloads is the only way to get acceptable type inference in all edge cases.
98+ # N.B. Having overlapping overloads is the only way to get acceptable type inference in all edge cases.
10099if sys .version_info >= (3 , 10 ):
101100 @overload
102- def gather (__coro_or_future1 : _FutureLike [_T1 ], * , return_exceptions : Literal [False ] = False ) -> Future [tuple [_T1 ]]: ... # type: ignore[misc ]
101+ def gather (__coro_or_future1 : _FutureLike [_T1 ], * , return_exceptions : Literal [False ] = False ) -> Future [tuple [_T1 ]]: ... # type: ignore[overload-overlap ]
103102 @overload
104- def gather ( # type: ignore[misc ]
103+ def gather ( # type: ignore[overload-overlap ]
105104 __coro_or_future1 : _FutureLike [_T1 ], __coro_or_future2 : _FutureLike [_T2 ], * , return_exceptions : Literal [False ] = False
106105 ) -> Future [tuple [_T1 , _T2 ]]: ...
107106 @overload
108- def gather ( # type: ignore[misc ]
107+ def gather ( # type: ignore[overload-overlap ]
109108 __coro_or_future1 : _FutureLike [_T1 ],
110109 __coro_or_future2 : _FutureLike [_T2 ],
111110 __coro_or_future3 : _FutureLike [_T3 ],
112111 * ,
113112 return_exceptions : Literal [False ] = False ,
114113 ) -> Future [tuple [_T1 , _T2 , _T3 ]]: ...
115114 @overload
116- def gather ( # type: ignore[misc ]
115+ def gather ( # type: ignore[overload-overlap ]
117116 __coro_or_future1 : _FutureLike [_T1 ],
118117 __coro_or_future2 : _FutureLike [_T2 ],
119118 __coro_or_future3 : _FutureLike [_T3 ],
@@ -122,7 +121,7 @@ if sys.version_info >= (3, 10):
122121 return_exceptions : Literal [False ] = False ,
123122 ) -> Future [tuple [_T1 , _T2 , _T3 , _T4 ]]: ...
124123 @overload
125- def gather ( # type: ignore[misc ]
124+ def gather ( # type: ignore[overload-overlap ]
126125 __coro_or_future1 : _FutureLike [_T1 ],
127126 __coro_or_future2 : _FutureLike [_T2 ],
128127 __coro_or_future3 : _FutureLike [_T3 ],
@@ -132,7 +131,7 @@ if sys.version_info >= (3, 10):
132131 return_exceptions : Literal [False ] = False ,
133132 ) -> Future [tuple [_T1 , _T2 , _T3 , _T4 , _T5 ]]: ...
134133 @overload
135- def gather ( # type: ignore[misc ]
134+ def gather ( # type: ignore[overload-overlap ]
136135 __coro_or_future1 : _FutureLike [_T1 ],
137136 __coro_or_future2 : _FutureLike [_T2 ],
138137 __coro_or_future3 : _FutureLike [_T3 ],
@@ -143,23 +142,23 @@ if sys.version_info >= (3, 10):
143142 return_exceptions : Literal [False ] = False ,
144143 ) -> Future [tuple [_T1 , _T2 , _T3 , _T4 , _T5 , _T6 ]]: ...
145144 @overload
146- def gather (* coros_or_futures : _FutureLike [_T ], return_exceptions : Literal [False ] = False ) -> Future [list [_T ]]: ... # type: ignore[misc ]
145+ def gather (* coros_or_futures : _FutureLike [_T ], return_exceptions : Literal [False ] = False ) -> Future [list [_T ]]: ... # type: ignore[overload-overlap ]
147146 @overload
148- def gather (__coro_or_future1 : _FutureLike [_T1 ], * , return_exceptions : bool ) -> Future [tuple [_T1 | BaseException ]]: ... # type: ignore[misc ]
147+ def gather (__coro_or_future1 : _FutureLike [_T1 ], * , return_exceptions : bool ) -> Future [tuple [_T1 | BaseException ]]: ... # type: ignore[overload-overlap ]
149148 @overload
150- def gather ( # type: ignore[misc ]
149+ def gather ( # type: ignore[overload-overlap ]
151150 __coro_or_future1 : _FutureLike [_T1 ], __coro_or_future2 : _FutureLike [_T2 ], * , return_exceptions : bool
152151 ) -> Future [tuple [_T1 | BaseException , _T2 | BaseException ]]: ...
153152 @overload
154- def gather ( # type: ignore[misc ]
153+ def gather ( # type: ignore[overload-overlap ]
155154 __coro_or_future1 : _FutureLike [_T1 ],
156155 __coro_or_future2 : _FutureLike [_T2 ],
157156 __coro_or_future3 : _FutureLike [_T3 ],
158157 * ,
159158 return_exceptions : bool ,
160159 ) -> Future [tuple [_T1 | BaseException , _T2 | BaseException , _T3 | BaseException ]]: ...
161160 @overload
162- def gather ( # type: ignore[misc ]
161+ def gather ( # type: ignore[overload-overlap ]
163162 __coro_or_future1 : _FutureLike [_T1 ],
164163 __coro_or_future2 : _FutureLike [_T2 ],
165164 __coro_or_future3 : _FutureLike [_T3 ],
@@ -168,7 +167,7 @@ if sys.version_info >= (3, 10):
168167 return_exceptions : bool ,
169168 ) -> Future [tuple [_T1 | BaseException , _T2 | BaseException , _T3 | BaseException , _T4 | BaseException ]]: ...
170169 @overload
171- def gather ( # type: ignore[misc ]
170+ def gather ( # type: ignore[overload-overlap ]
172171 __coro_or_future1 : _FutureLike [_T1 ],
173172 __coro_or_future2 : _FutureLike [_T2 ],
174173 __coro_or_future3 : _FutureLike [_T3 ],
@@ -180,7 +179,7 @@ if sys.version_info >= (3, 10):
180179 tuple [_T1 | BaseException , _T2 | BaseException , _T3 | BaseException , _T4 | BaseException , _T5 | BaseException ]
181180 ]: ...
182181 @overload
183- def gather ( # type: ignore[misc ]
182+ def gather ( # type: ignore[overload-overlap ]
184183 __coro_or_future1 : _FutureLike [_T1 ],
185184 __coro_or_future2 : _FutureLike [_T2 ],
186185 __coro_or_future3 : _FutureLike [_T3 ],
@@ -204,19 +203,19 @@ if sys.version_info >= (3, 10):
204203
205204else :
206205 @overload
207- def gather ( # type: ignore[misc ]
206+ def gather ( # type: ignore[overload-overlap ]
208207 __coro_or_future1 : _FutureLike [_T1 ], * , loop : AbstractEventLoop | None = None , return_exceptions : Literal [False ] = False
209208 ) -> Future [tuple [_T1 ]]: ...
210209 @overload
211- def gather ( # type: ignore[misc ]
210+ def gather ( # type: ignore[overload-overlap ]
212211 __coro_or_future1 : _FutureLike [_T1 ],
213212 __coro_or_future2 : _FutureLike [_T2 ],
214213 * ,
215214 loop : AbstractEventLoop | None = None ,
216215 return_exceptions : Literal [False ] = False ,
217216 ) -> Future [tuple [_T1 , _T2 ]]: ...
218217 @overload
219- def gather ( # type: ignore[misc ]
218+ def gather ( # type: ignore[overload-overlap ]
220219 __coro_or_future1 : _FutureLike [_T1 ],
221220 __coro_or_future2 : _FutureLike [_T2 ],
222221 __coro_or_future3 : _FutureLike [_T3 ],
@@ -225,7 +224,7 @@ else:
225224 return_exceptions : Literal [False ] = False ,
226225 ) -> Future [tuple [_T1 , _T2 , _T3 ]]: ...
227226 @overload
228- def gather ( # type: ignore[misc ]
227+ def gather ( # type: ignore[overload-overlap ]
229228 __coro_or_future1 : _FutureLike [_T1 ],
230229 __coro_or_future2 : _FutureLike [_T2 ],
231230 __coro_or_future3 : _FutureLike [_T3 ],
@@ -235,7 +234,7 @@ else:
235234 return_exceptions : Literal [False ] = False ,
236235 ) -> Future [tuple [_T1 , _T2 , _T3 , _T4 ]]: ...
237236 @overload
238- def gather ( # type: ignore[misc ]
237+ def gather ( # type: ignore[overload-overlap ]
239238 __coro_or_future1 : _FutureLike [_T1 ],
240239 __coro_or_future2 : _FutureLike [_T2 ],
241240 __coro_or_future3 : _FutureLike [_T3 ],
@@ -246,7 +245,7 @@ else:
246245 return_exceptions : Literal [False ] = False ,
247246 ) -> Future [tuple [_T1 , _T2 , _T3 , _T4 , _T5 ]]: ...
248247 @overload
249- def gather ( # type: ignore[misc ]
248+ def gather ( # type: ignore[overload-overlap ]
250249 __coro_or_future1 : _FutureLike [_T1 ],
251250 __coro_or_future2 : _FutureLike [_T2 ],
252251 __coro_or_future3 : _FutureLike [_T3 ],
@@ -258,23 +257,23 @@ else:
258257 return_exceptions : Literal [False ] = False ,
259258 ) -> Future [tuple [_T1 , _T2 , _T3 , _T4 , _T5 , _T6 ]]: ...
260259 @overload
261- def gather ( # type: ignore[misc ]
260+ def gather ( # type: ignore[overload-overlap ]
262261 * coros_or_futures : _FutureLike [_T ], loop : AbstractEventLoop | None = None , return_exceptions : Literal [False ] = False
263262 ) -> Future [list [_T ]]: ...
264263 @overload
265- def gather ( # type: ignore[misc ]
264+ def gather ( # type: ignore[overload-overlap ]
266265 __coro_or_future1 : _FutureLike [_T1 ], * , loop : AbstractEventLoop | None = None , return_exceptions : bool
267266 ) -> Future [tuple [_T1 | BaseException ]]: ...
268267 @overload
269- def gather ( # type: ignore[misc ]
268+ def gather ( # type: ignore[overload-overlap ]
270269 __coro_or_future1 : _FutureLike [_T1 ],
271270 __coro_or_future2 : _FutureLike [_T2 ],
272271 * ,
273272 loop : AbstractEventLoop | None = None ,
274273 return_exceptions : bool ,
275274 ) -> Future [tuple [_T1 | BaseException , _T2 | BaseException ]]: ...
276275 @overload
277- def gather ( # type: ignore[misc ]
276+ def gather ( # type: ignore[overload-overlap ]
278277 __coro_or_future1 : _FutureLike [_T1 ],
279278 __coro_or_future2 : _FutureLike [_T2 ],
280279 __coro_or_future3 : _FutureLike [_T3 ],
@@ -283,7 +282,7 @@ else:
283282 return_exceptions : bool ,
284283 ) -> Future [tuple [_T1 | BaseException , _T2 | BaseException , _T3 | BaseException ]]: ...
285284 @overload
286- def gather ( # type: ignore[misc ]
285+ def gather ( # type: ignore[overload-overlap ]
287286 __coro_or_future1 : _FutureLike [_T1 ],
288287 __coro_or_future2 : _FutureLike [_T2 ],
289288 __coro_or_future3 : _FutureLike [_T3 ],
@@ -293,7 +292,7 @@ else:
293292 return_exceptions : bool ,
294293 ) -> Future [tuple [_T1 | BaseException , _T2 | BaseException , _T3 | BaseException , _T4 | BaseException ]]: ...
295294 @overload
296- def gather ( # type: ignore[misc ]
295+ def gather ( # type: ignore[overload-overlap ]
297296 __coro_or_future1 : _FutureLike [_T1 ],
298297 __coro_or_future2 : _FutureLike [_T2 ],
299298 __coro_or_future3 : _FutureLike [_T3 ],
@@ -314,7 +313,7 @@ else:
314313 ]
315314 ]: ...
316315 @overload
317- def gather ( # type: ignore[misc]
316+ def gather (
318317 * coros_or_futures : _FutureLike [_T ], loop : AbstractEventLoop | None = None , return_exceptions : bool
319318 ) -> Future [list [_T | BaseException ]]: ...
320319
@@ -338,23 +337,27 @@ else:
338337
339338if sys .version_info >= (3 , 11 ):
340339 @overload
341- async def wait (fs : Iterable [_FT ], * , timeout : float | None = None , return_when : str = "ALL_COMPLETED" ) -> tuple [set [_FT ], set [_FT ]]: ... # type: ignore[misc]
340+ async def wait (
341+ fs : Iterable [_FT ], * , timeout : float | None = None , return_when : str = "ALL_COMPLETED"
342+ ) -> tuple [set [_FT ], set [_FT ]]: ...
342343 @overload
343344 async def wait (
344345 fs : Iterable [Task [_T ]], * , timeout : float | None = None , return_when : str = "ALL_COMPLETED"
345346 ) -> tuple [set [Task [_T ]], set [Task [_T ]]]: ...
346347
347348elif sys .version_info >= (3 , 10 ):
348349 @overload
349- async def wait (fs : Iterable [_FT ], * , timeout : float | None = None , return_when : str = "ALL_COMPLETED" ) -> tuple [set [_FT ], set [_FT ]]: ... # type: ignore[misc]
350+ async def wait ( # type: ignore[overload-overlap]
351+ fs : Iterable [_FT ], * , timeout : float | None = None , return_when : str = "ALL_COMPLETED"
352+ ) -> tuple [set [_FT ], set [_FT ]]: ...
350353 @overload
351354 async def wait (
352355 fs : Iterable [Awaitable [_T ]], * , timeout : float | None = None , return_when : str = "ALL_COMPLETED"
353356 ) -> tuple [set [Task [_T ]], set [Task [_T ]]]: ...
354357
355358else :
356359 @overload
357- async def wait ( # type: ignore[misc ]
360+ async def wait ( # type: ignore[overload-overlap ]
358361 fs : Iterable [_FT ],
359362 * ,
360363 loop : AbstractEventLoop | None = None ,
0 commit comments