mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-28 07:20:17 +01:00
Docs fixes (#765)
* Clean warnings during build_sphinx * fix documentation types
This commit is contained in:
parent
b6ef30a454
commit
5ceb6f8f36
5 changed files with 19 additions and 19 deletions
0
docs/source/_static/.placeholder
Normal file
0
docs/source/_static/.placeholder
Normal file
|
@ -616,7 +616,7 @@ class Bot(TelegramObject):
|
|||
the Internet, or upload a new one using multipart/form-data. Lastly you can pass
|
||||
an existing :class:`telegram.Video` object to send.
|
||||
duration (:obj:`int`, optional): Duration of sent video in seconds.
|
||||
width (Optional[int)): Video width.
|
||||
width (:obj:`int`, optional): Video width.
|
||||
height (:obj:`int`, optional): Video height.
|
||||
caption (:obj:`str`, optional): Video caption (may also be used when resending videos
|
||||
by file_id), 0-200 characters.
|
||||
|
|
|
@ -31,7 +31,7 @@ class CallbackQuery(TelegramObject):
|
|||
|
||||
Note:
|
||||
* In Python `from` is a reserved word, use `from_user` instead.
|
||||
Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present.
|
||||
* Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present.
|
||||
|
||||
Attributes:
|
||||
id (:obj:`str`): Unique identifier for this query.
|
||||
|
|
|
@ -222,8 +222,8 @@ class Updater(object):
|
|||
key (:obj:`str`, optional): Path to the SSL key file.
|
||||
clean (:obj:`bool`, optional): Whether to clean any pending updates on Telegram servers
|
||||
before actually starting the webhook. Default is ``False``.
|
||||
bootstrap_retries (Optional[int[): Whether the bootstrapping phase of the `Updater`
|
||||
will retry on failures on the Telegram server.
|
||||
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
|
||||
`Updater` will retry on failures on the Telegram server.
|
||||
|
||||
* < 0 - retry indefinitely
|
||||
* 0 - no retries (default)
|
||||
|
|
|
@ -215,10 +215,10 @@ class Request(object):
|
|||
"""Request an URL.
|
||||
|
||||
Args:
|
||||
url (str): The web location we want to retrieve.
|
||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
||||
from the server (instead of the one specified during creation of the connection
|
||||
pool).
|
||||
url (:obj:`str`): The web location we want to retrieve.
|
||||
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||
timeout from the server (instead of the one specified during creation of the
|
||||
connection pool).
|
||||
|
||||
Returns:
|
||||
A JSON object.
|
||||
|
@ -235,11 +235,11 @@ class Request(object):
|
|||
def post(self, url, data, timeout=None):
|
||||
"""Request an URL.
|
||||
Args:
|
||||
url (str): The web location we want to retrieve.
|
||||
url (:obj:`str`): The web location we want to retrieve.
|
||||
data (dict[str, str|int]): A dict of key/value pairs. Note: On py2.7 value is unicode.
|
||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
||||
from the server (instead of the one specified during creation of the connection
|
||||
pool).
|
||||
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||
timeout from the server (instead of the one specified during creation of the
|
||||
connection pool).
|
||||
|
||||
Returns:
|
||||
A JSON object.
|
||||
|
@ -269,10 +269,10 @@ class Request(object):
|
|||
"""Retrieve the contents of a file by its URL.
|
||||
|
||||
Args:
|
||||
url (str): The web location we want to retrieve.
|
||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
||||
from the server (instead of the one specified during creation of the connection
|
||||
pool).
|
||||
url (:obj:`str`): The web location we want to retrieve.
|
||||
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||
timeout from the server (instead of the one specified during creation of the
|
||||
connection pool).
|
||||
|
||||
"""
|
||||
urlopen_kwargs = {}
|
||||
|
@ -285,9 +285,9 @@ class Request(object):
|
|||
"""Download a file by its URL.
|
||||
Args:
|
||||
url (str): The web location we want to retrieve.
|
||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
||||
from the server (instead of the one specified during creation of the connection
|
||||
pool).
|
||||
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||
timeout from the server (instead of the one specified during creation of the
|
||||
connection pool).
|
||||
|
||||
filename:
|
||||
The filename within the path to download the file.
|
||||
|
|
Loading…
Reference in a new issue