From: JR Heard Date: Wed, 2 Jul 2025 12:44:37 +0000 (-0700) Subject: Add overloads to gen.multi() (#3515) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Ftornado.git Add overloads to gen.multi() (#3515) Add overloads to gen.multi(). Closes #3514. --- diff --git a/tornado/gen.py b/tornado/gen.py index 1ee8b608..7bfbaf01 100644 --- a/tornado/gen.py +++ b/tornado/gen.py @@ -437,6 +437,20 @@ class WaitIterator: return self.next() +@overload +def multi( + children: Sequence[_Yieldable], + quiet_exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = (), +) -> Future[List]: ... + + +@overload +def multi( + children: Mapping[Any, _Yieldable], + quiet_exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = (), +) -> Future[Dict]: ... + + def multi( children: Union[Sequence[_Yieldable], Mapping[Any, _Yieldable]], quiet_exceptions: "Union[Type[Exception], Tuple[Type[Exception], ...]]" = (),