Skip to content

Commit 5ceb6f8

Browse files
authored
* Clean warnings during build_sphinx * fix documentation types
1 parent b6ef30a commit 5ceb6f8

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

docs/source/_static/.placeholder

Whitespace-only changes.

telegram/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ def send_video(self,
616616
the Internet, or upload a new one using multipart/form-data. Lastly you can pass
617617
an existing :class:`telegram.Video` object to send.
618618
duration (:obj:`int`, optional): Duration of sent video in seconds.
619-
width (Optional[int)): Video width.
619+
width (:obj:`int`, optional): Video width.
620620
height (:obj:`int`, optional): Video height.
621621
caption (:obj:`str`, optional): Video caption (may also be used when resending videos
622622
by file_id), 0-200 characters.

telegram/callbackquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CallbackQuery(TelegramObject):
3131
3232
Note:
3333
* In Python `from` is a reserved word, use `from_user` instead.
34-
Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present.
34+
* Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present.
3535
3636
Attributes:
3737
id (:obj:`str`): Unique identifier for this query.

telegram/ext/updater.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ def start_webhook(self,
222222
key (:obj:`str`, optional): Path to the SSL key file.
223223
clean (:obj:`bool`, optional): Whether to clean any pending updates on Telegram servers
224224
before actually starting the webhook. Default is ``False``.
225-
bootstrap_retries (Optional[int[): Whether the bootstrapping phase of the `Updater`
226-
will retry on failures on the Telegram server.
225+
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
226+
`Updater` will retry on failures on the Telegram server.
227227
228228
* < 0 - retry indefinitely
229229
* 0 - no retries (default)

telegram/utils/request.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ def get(self, url, timeout=None):
215215
"""Request an URL.
216216
217217
Args:
218-
url (str): The web location we want to retrieve.
219-
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
220-
from the server (instead of the one specified during creation of the connection
221-
pool).
218+
url (:obj:`str`): The web location we want to retrieve.
219+
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
220+
timeout from the server (instead of the one specified during creation of the
221+
connection pool).
222222
223223
Returns:
224224
A JSON object.
@@ -235,11 +235,11 @@ def get(self, url, timeout=None):
235235
def post(self, url, data, timeout=None):
236236
"""Request an URL.
237237
Args:
238-
url (str): The web location we want to retrieve.
238+
url (:obj:`str`): The web location we want to retrieve.
239239
data (dict[str, str|int]): A dict of key/value pairs. Note: On py2.7 value is unicode.
240-
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
241-
from the server (instead of the one specified during creation of the connection
242-
pool).
240+
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
241+
timeout from the server (instead of the one specified during creation of the
242+
connection pool).
243243
244244
Returns:
245245
A JSON object.
@@ -269,10 +269,10 @@ def retrieve(self, url, timeout=None):
269269
"""Retrieve the contents of a file by its URL.
270270
271271
Args:
272-
url (str): The web location we want to retrieve.
273-
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
274-
from the server (instead of the one specified during creation of the connection
275-
pool).
272+
url (:obj:`str`): The web location we want to retrieve.
273+
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
274+
timeout from the server (instead of the one specified during creation of the
275+
connection pool).
276276
277277
"""
278278
urlopen_kwargs = {}
@@ -285,9 +285,9 @@ def download(self, url, filename, timeout=None):
285285
"""Download a file by its URL.
286286
Args:
287287
url (str): The web location we want to retrieve.
288-
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
289-
from the server (instead of the one specified during creation of the connection
290-
pool).
288+
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
289+
timeout from the server (instead of the one specified during creation of the
290+
connection pool).
291291
292292
filename:
293293
The filename within the path to download the file.

0 commit comments

Comments
 (0)