mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-29 15:49:02 +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
|
the Internet, or upload a new one using multipart/form-data. Lastly you can pass
|
||||||
an existing :class:`telegram.Video` object to send.
|
an existing :class:`telegram.Video` object to send.
|
||||||
duration (:obj:`int`, optional): Duration of sent video in seconds.
|
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.
|
height (:obj:`int`, optional): Video height.
|
||||||
caption (:obj:`str`, optional): Video caption (may also be used when resending videos
|
caption (:obj:`str`, optional): Video caption (may also be used when resending videos
|
||||||
by file_id), 0-200 characters.
|
by file_id), 0-200 characters.
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CallbackQuery(TelegramObject):
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
* In Python `from` is a reserved word, use `from_user` instead.
|
* 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:
|
Attributes:
|
||||||
id (:obj:`str`): Unique identifier for this query.
|
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.
|
key (:obj:`str`, optional): Path to the SSL key file.
|
||||||
clean (:obj:`bool`, optional): Whether to clean any pending updates on Telegram servers
|
clean (:obj:`bool`, optional): Whether to clean any pending updates on Telegram servers
|
||||||
before actually starting the webhook. Default is ``False``.
|
before actually starting the webhook. Default is ``False``.
|
||||||
bootstrap_retries (Optional[int[): Whether the bootstrapping phase of the `Updater`
|
bootstrap_retries (:obj:`int`, optional): Whether the bootstrapping phase of the
|
||||||
will retry on failures on the Telegram server.
|
`Updater` will retry on failures on the Telegram server.
|
||||||
|
|
||||||
* < 0 - retry indefinitely
|
* < 0 - retry indefinitely
|
||||||
* 0 - no retries (default)
|
* 0 - no retries (default)
|
||||||
|
|
|
@ -215,10 +215,10 @@ class Request(object):
|
||||||
"""Request an URL.
|
"""Request an URL.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
url (str): The web location we want to retrieve.
|
url (:obj:`str`): The web location we want to retrieve.
|
||||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||||
from the server (instead of the one specified during creation of the connection
|
timeout from the server (instead of the one specified during creation of the
|
||||||
pool).
|
connection pool).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A JSON object.
|
A JSON object.
|
||||||
|
@ -235,11 +235,11 @@ class Request(object):
|
||||||
def post(self, url, data, timeout=None):
|
def post(self, url, data, timeout=None):
|
||||||
"""Request an URL.
|
"""Request an URL.
|
||||||
Args:
|
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.
|
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
|
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||||
from the server (instead of the one specified during creation of the connection
|
timeout from the server (instead of the one specified during creation of the
|
||||||
pool).
|
connection pool).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A JSON object.
|
A JSON object.
|
||||||
|
@ -269,10 +269,10 @@ class Request(object):
|
||||||
"""Retrieve the contents of a file by its URL.
|
"""Retrieve the contents of a file by its URL.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
url (str): The web location we want to retrieve.
|
url (:obj:`str`): The web location we want to retrieve.
|
||||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||||
from the server (instead of the one specified during creation of the connection
|
timeout from the server (instead of the one specified during creation of the
|
||||||
pool).
|
connection pool).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
urlopen_kwargs = {}
|
urlopen_kwargs = {}
|
||||||
|
@ -285,9 +285,9 @@ class Request(object):
|
||||||
"""Download a file by its URL.
|
"""Download a file by its URL.
|
||||||
Args:
|
Args:
|
||||||
url (str): The web location we want to retrieve.
|
url (str): The web location we want to retrieve.
|
||||||
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
|
timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
|
||||||
from the server (instead of the one specified during creation of the connection
|
timeout from the server (instead of the one specified during creation of the
|
||||||
pool).
|
connection pool).
|
||||||
|
|
||||||
filename:
|
filename:
|
||||||
The filename within the path to download the file.
|
The filename within the path to download the file.
|
||||||
|
|
Loading…
Reference in a new issue