Fix Inconsistent Type Hints for timeout Parameter of Bot.get_updates (#3709)

This commit is contained in:
Iulian Onofrei 2023-05-19 21:09:16 +01:00 committed by GitHub
parent 57c780c62f
commit 4f15a7feee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -3586,7 +3586,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]):
self,
offset: Optional[int] = None,
limit: Optional[int] = None,
timeout: Optional[float] = None,
timeout: Optional[int] = None,
allowed_updates: Optional[Sequence[str]] = None,
*,
read_timeout: float = 2,

View file

@ -673,7 +673,7 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AsyncContextManager["Applica
Args:
poll_interval (:obj:`float`, optional): Time to wait between polling updates from
Telegram in seconds. Default is ``0.0``.
timeout (:obj:`float`, optional): Passed to
timeout (:obj:`int`, optional): Passed to
:paramref:`telegram.Bot.get_updates.timeout`. Default is ``10`` seconds.
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
:class:`telegram.ext.Updater` will retry on failures on the Telegram server.

View file

@ -531,7 +531,7 @@ class ExtBot(Bot, Generic[RLARGS]):
self,
offset: Optional[int] = None,
limit: Optional[int] = None,
timeout: Optional[float] = None,
timeout: Optional[int] = None,
allowed_updates: Optional[Sequence[str]] = None,
*,
read_timeout: float = 2,

View file

@ -202,7 +202,7 @@ class Updater(AsyncContextManager["Updater"]):
Args:
poll_interval (:obj:`float`, optional): Time to wait between polling updates from
Telegram in seconds. Default is ``0.0``.
timeout (:obj:`float`, optional): Passed to
timeout (:obj:`int`, optional): Passed to
:paramref:`telegram.Bot.get_updates.timeout`. Defaults to ``10`` seconds.
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
:class:`telegram.ext.Updater` will retry on failures on the Telegram server.