8000 Fix Inconsistent Type Hints for `timeout` Parameter of `Bot.get_updat… · Devors/python-telegram-bot@4f15a7f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f15a7f

Browse files
authored
Fix Inconsistent Type Hints for timeout Parameter of Bot.get_updates (python-telegram-bot#3709)
1 parent 57c780c commit 4f15a7f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

telegram/_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3586,7 +3586,7 @@ async def get_updates(
35863586
self,
35873587
offset: Optional[int] = None,
35883588
limit: Optional[int] = None,
3589-
timeout: Optional[float] = None,
3589+
timeout: Optional[int] = None,
35903590
allowed_updates: Optional[Sequence[str]] = None,
35913591
*,
35923592
read_timeout: float = 2,

telegram/ext/_application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def run_polling(
673673
Args:
674674
poll_interval (:obj:`float`, optional): Time to wait between polling updates from
675675
Telegram in seconds. Default is ``0.0``.
676-
timeout (:obj:`float`, optional): Passed to
676+
timeout (:obj:`int`, optional): Passed to
677677
:paramref:`telegram.Bot.get_updates.timeout`. Default is ``10`` seconds.
678678
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
679679
:class:`telegram.ext.Updater` will retry on failures on the Telegram server.

telegram/ext/_extbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ async def get_updates(
531531
self,
532532
offset: Optional[int] = None,
533533
limit: Optional[int] = None,
534-
timeout: Optional[float] = None,
534+
timeout: Optional[int] = None,
535535
allowed_updates: Optional[Sequence[str]] = None,
536536
*,
537537
read_timeout: float = 2,

telegram/ext/_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ async def start_polling(
202202
Args:
203203
poll_interval (:obj:`float`, optional): Time to wait between polling updates from
204204
Telegram in seconds. Default is ``0.0``.
205-
timeout (:obj:`float`, optional): Passed to
205+
timeout (:obj:`int`, optional): Passed to
206206
:paramref:`telegram.Bot.get_updates.timeout`. Defaults to ``10`` seconds.
207207
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
208208
:class:`telegram.ext.Updater` will retry on failures on the Telegram server.

0 commit comments

Comments
 (0)
0