diff --git a/README.rst b/README.rst index db73aa3d9a5..e395a5e16ae 100644 --- a/README.rst +++ b/README.rst @@ -144,7 +144,7 @@ Optional Dependencies PTB can be installed with optional dependencies: * ``pip install python-telegram-bot[passport]`` installs the `cryptography `_ library. Use this, if you want to use Telegram Passport related functionality. -* ``pip install python-telegram-bot[ujson]`` installs the `ujson `_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json `_ library. +* ``pip install python-telegram-bot[json]`` installs the `ujson `_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json `_ library. * ``pip install python-telegram-bot[socks]`` installs the `PySocks `_ library. Use this, if you want to work behind a Socks5 server. =============== diff --git a/README_RAW.rst b/README_RAW.rst index 60c20693186..7a7165d5b2d 100644 --- a/README_RAW.rst +++ b/README_RAW.rst @@ -144,7 +144,7 @@ Optional Dependencies PTB can be installed with optional dependencies: * ``pip install python-telegram-bot-raw[passport]`` installs the `cryptography `_ library. Use this, if you want to use Telegram Passport related functionality. -* ``pip install python-telegram-bot-raw[ujson]`` installs the `ujson `_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json `_ library. +* ``pip install python-telegram-bot-raw[json]`` installs the `ujson `_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json `_ library. =============== Getting started diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 0c35bfae764..7c297765d20 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,4 +1,4 @@ -sphinx==3.5.4 +sphinx==4.2.0 sphinx-pypi-upload # When bumping this, make sure to rebuild the dark-mode CSS # More instructions at source/_static/dark.css diff --git a/docs/source/conf.py b/docs/source/conf.py index e2dddfb3cf9..38dad78be6e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = '3.5.2' +needs_sphinx = '4.2.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom diff --git a/examples/README.md b/examples/README.md index 7deb05ff363..617f259e30a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -25,7 +25,7 @@ A even more complex example of a bot that uses the nested `ConversationHandler`s A basic example of a bot store conversation state and user_data over multiple restarts. ### [`inlinekeyboard.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard.py) -This example sheds some light on inline keyboards, callback queries and message editing. A wikipedia site explaining this examples lives at https://git.io/JOmFw. +This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives at https://git.io/JOmFw. ### [`inlinekeyboard2.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard2.py) A more complex example about inline keyboards, callback queries and message editing. This example showcases how an interactive menu could be build using inline keyboards. diff --git a/telegram/bot.py b/telegram/bot.py index b8dc82daad6..72029b4cbf1 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -1684,8 +1684,8 @@ def stop_message_live_location( Telegram API. Returns: - :class:`telegram.Message`: On success, if edited message is sent by the bot, the - sent Message is returned, otherwise :obj:`True` is returned. + :class:`telegram.Message`: On success, if edited message is not an inline message, the + edited message is returned, otherwise :obj:`True` is returned. """ data: JSONDict = {} @@ -2617,7 +2617,7 @@ def edit_message_media( Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline - message is edited, a new file can't be uploaded. Use a previously uploaded file via its + message is edited, a new file can't be uploaded; use a previously uploaded file via its ``file_id`` or specify a URL. Args: @@ -2639,8 +2639,8 @@ def edit_message_media( Telegram API. Returns: - :class:`telegram.Message`: On success, if edited message is not an inline message, the - edited Message is returned, otherwise :obj:`True` is returned. + :class:`telegram.Message`: On success, if the edited message is not an inline message + , the edited Message is returned, otherwise :obj:`True` is returned. Raises: :class:`telegram.error.TelegramError` @@ -3205,7 +3205,7 @@ def set_game_score( api_kwargs: JSONDict = None, ) -> Union[Message, bool]: """ - Use this method to set the score of the specified user in a game. + Use this method to set the score of the specified user in a game message. Args: user_id (:obj:`int`): User identifier. @@ -3227,7 +3227,7 @@ def set_game_score( Telegram API. Returns: - :class:`telegram.Message`: The edited message, or if the message wasn't sent by the bot + :class:`telegram.Message`: The edited message. If the message is not an inline message , :obj:`True`. Raises: @@ -4860,8 +4860,7 @@ def stop_poll( Telegram API. Returns: - :class:`telegram.Poll`: On success, the stopped Poll with the final results is - returned. + :class:`telegram.Poll`: On success, the stopped Poll is returned. Raises: :class:`telegram.error.TelegramError` diff --git a/telegram/constants.py b/telegram/constants.py index 91e2d00701d..4363f8a75e0 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -206,25 +206,25 @@ Attributes: BOT_COMMAND_SCOPE_DEFAULT (:obj:`str`): ``'default'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 BOT_COMMAND_SCOPE_ALL_PRIVATE_CHATS (:obj:`str`): ``'all_private_chats'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 BOT_COMMAND_SCOPE_ALL_GROUP_CHATS (:obj:`str`): ``'all_group_chats'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 BOT_COMMAND_SCOPE_ALL_CHAT_ADMINISTRATORS (:obj:`str`): ``'all_chat_administrators'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 BOT_COMMAND_SCOPE_CHAT (:obj:`str`): ``'chat'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 BOT_COMMAND_SCOPE_CHAT_ADMINISTRATORS (:obj:`str`): ``'chat_administrators'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 BOT_COMMAND_SCOPE_CHAT_MEMBER (:obj:`str`): ``'chat_member'`` - ..versionadded:: 13.7 + .. versionadded:: 13.7 """ from typing import List diff --git a/telegram/ext/jobqueue.py b/telegram/ext/jobqueue.py index ac255ad355b..208481e6dbd 100644 --- a/telegram/ext/jobqueue.py +++ b/telegram/ext/jobqueue.py @@ -41,8 +41,6 @@ class JobQueue: Attributes: scheduler (:class:`apscheduler.schedulers.background.BackgroundScheduler`): The APScheduler - bot (:class:`telegram.Bot`): The bot instance that should be passed to the jobs. - DEPRECATED: Use :attr:`set_dispatcher` instead. """ @@ -111,8 +109,7 @@ def _parse_time_input( return time def set_dispatcher(self, dispatcher: 'Dispatcher') -> None: - """Set the dispatcher to be used by this JobQueue. Use this instead of passing a - :class:`telegram.Bot` to the JobQueue, which is deprecated. + """Set the dispatcher to be used by this JobQueue. Args: dispatcher (:class:`telegram.ext.Dispatcher`): The dispatcher. diff --git a/telegram/files/inputfile.py b/telegram/files/inputfile.py index 9f91367be23..c057cdb2088 100644 --- a/telegram/files/inputfile.py +++ b/telegram/files/inputfile.py @@ -47,6 +47,7 @@ class InputFile: input_file_content (:obj:`bytes`): The binary content of the file to send. filename (:obj:`str`): Optional. Filename for the file to be sent. attach (:obj:`str`): Optional. Attach id for sending multiple files. + mimetype (:obj:`str`): Optional. The mimetype inferred from the file to be sent. """ diff --git a/telegram/files/location.py b/telegram/files/location.py index 2db8ef9576f..527826b2ebd 100644 --- a/telegram/files/location.py +++ b/telegram/files/location.py @@ -27,7 +27,7 @@ class Location(TelegramObject): """This object represents a point on the map. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`longitute` and :attr:`latitude` are equal. + considered equal, if their :attr:`longitude` and :attr:`latitude` are equal. Args: longitude (:obj:`float`): Longitude as defined by sender. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy