diff --git a/README.rst b/README.rst index 9d0ff953ba7..4da64e2b90d 100644 --- a/README.rst +++ b/README.rst @@ -206,7 +206,7 @@ Concurrency ~~~~~~~~~~~ Since v20.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module. -Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` does currently not aim to be thread-safe. +Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` currently does not aim to be thread-safe. Noteworthy parts of ``python-telegram-bots`` API that are likely to cause issues (e.g. race conditions) when used in a multi-threaded setting include: * ``telegram.ext.Application/Updater.update_queue`` diff --git a/changes/unreleased/4878.AbGo6aozTWquUjnzzpSdyX.toml b/changes/unreleased/4878.AbGo6aozTWquUjnzzpSdyX.toml new file mode 100644 index 00000000000..81e41dc7b98 --- /dev/null +++ b/changes/unreleased/4878.AbGo6aozTWquUjnzzpSdyX.toml @@ -0,0 +1,9 @@ +documentation = "Documentation Improvements" + +[[pull_requests]] +uid = "4878" +author_uid = "Bibo-Joshi" + +[[pull_requests]] +uid = "4872" +author_uid = "Ca5parAD" diff --git a/src/telegram/_checklists.py b/src/telegram/_checklists.py index e062e32aa3a..5c09c361f0e 100644 --- a/src/telegram/_checklists.py +++ b/src/telegram/_checklists.py @@ -40,7 +40,7 @@ class ChecklistTask(TelegramObject): Describes a task in a checklist. Objects of this class are comparable in terms of equality. - Two objects of this class are considered equal, if all their :attr:`id` is equal. + Two objects of this class are considered equal, if their :attr:`id` is equal. .. versionadded:: 22.3 diff --git a/src/telegram/_gifts.py b/src/telegram/_gifts.py index 7c49aa1fd1e..8aaae4ad774 100644 --- a/src/telegram/_gifts.py +++ b/src/telegram/_gifts.py @@ -42,28 +42,30 @@ class Gift(TelegramObject): .. versionadded:: 21.8 Args: - id (:obj:`str`): Unique identifier of the gift - sticker (:class:`~telegram.Sticker`): The sticker that represents the gift - star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the sticker + id (:obj:`str`): Unique identifier of the gift. + sticker (:class:`~telegram.Sticker`): The sticker that represents the gift. + star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the + sticker. total_count (:obj:`int`, optional): The total number of the gifts of this type that can be - sent; for limited gifts only + sent; for limited gifts only. remaining_count (:obj:`int`, optional): The number of remaining gifts of this type that can - be sent; for limited gifts only + be sent; for limited gifts only. upgrade_star_count (:obj:`int`, optional): The number of Telegram Stars that must be paid - to upgrade the gift to a unique one + to upgrade the gift to a unique one. .. versionadded:: 21.10 Attributes: - id (:obj:`str`): Unique identifier of the gift - sticker (:class:`~telegram.Sticker`): The sticker that represents the gift - star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the sticker + id (:obj:`str`): Unique identifier of the gift. + sticker (:class:`~telegram.Sticker`): The sticker that represents the gift. + star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the + sticker. total_count (:obj:`int`): Optional. The total number of the gifts of this type that can be - sent; for limited gifts only + sent; for limited gifts only. remaining_count (:obj:`int`): Optional. The number of remaining gifts of this type that can - be sent; for limited gifts only + be sent; for limited gifts only. upgrade_star_count (:obj:`int`): Optional. The number of Telegram Stars that must be paid - to upgrade the gift to a unique one + to upgrade the gift to a unique one. .. versionadded:: 21.10 @@ -119,10 +121,10 @@ class Gifts(TelegramObject): .. versionadded:: 21.8 Args: - gifts (Sequence[:class:`Gift`]): The sequence of gifts + gifts (Sequence[:class:`Gift`]): The sequence of gifts. Attributes: - gifts (tuple[:class:`Gift`]): The sequence of gifts + gifts (tuple[:class:`Gift`]): The sequence of gifts. """ @@ -161,12 +163,12 @@ class GiftInfo(TelegramObject): Args: gift (:class:`Gift`): Information about the gift. owned_gift_id (:obj:`str`, optional): Unique identifier of the received gift for the bot; - only present for gifts received on behalf of business accounts + only present for gifts received on behalf of business accounts. convert_star_count (:obj:`int`, optional) Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars - is impossible + is impossible. prepaid_upgrade_star_count (:obj:`int`, optional): Number of Telegram Stars that were - prepaid by the sender for the ability to upgrade the gift + prepaid by the sender for the ability to upgrade the gift. can_be_upgraded (:obj:`bool`, optional): :obj:`True`, if the gift can be upgraded to a unique gift. text (:obj:`str`, optional): Text of the message that was added to the gift. @@ -178,12 +180,12 @@ class GiftInfo(TelegramObject): Attributes: gift (:class:`Gift`): Information about the gift. owned_gift_id (:obj:`str`): Optional. Unique identifier of the received gift for the bot; - only present for gifts received on behalf of business accounts + only present for gifts received on behalf of business accounts. convert_star_count (:obj:`int`): Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars - is impossible + is impossible. prepaid_upgrade_star_count (:obj:`int`): Optional. Number of Telegram Stars that were - prepaid by the sender for the ability to upgrade the gift + prepaid by the sender for the ability to upgrade the gift. can_be_upgraded (:obj:`bool`): Optional. :obj:`True`, if the gift can be upgraded to a unique gift. text (:obj:`str`): Optional. Text of the message that was added to the gift. diff --git a/src/telegram/_inline/inlinequeryresultgif.py b/src/telegram/_inline/inlinequeryresultgif.py index 6832f6586bc..b2d85e7b5d2 100644 --- a/src/telegram/_inline/inlinequeryresultgif.py +++ b/src/telegram/_inline/inlinequeryresultgif.py @@ -63,7 +63,7 @@ class InlineQueryResultGif(InlineQueryResult): .. versionadded:: 20.2 - ..versionchanged:: 20.5 + .. versionchanged:: 20.5 |thumbnail_url_mandatory| thumbnail_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of diff --git a/src/telegram/_inline/inlinequeryresultmpeg4gif.py b/src/telegram/_inline/inlinequeryresultmpeg4gif.py index 39940797ec3..c68dbe5a5a3 100644 --- a/src/telegram/_inline/inlinequeryresultmpeg4gif.py +++ b/src/telegram/_inline/inlinequeryresultmpeg4gif.py @@ -64,7 +64,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): .. versionadded:: 20.2 - ..versionchanged:: 20.5 + .. versionchanged:: 20.5 |thumbnail_url_mandatory| thumbnail_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of diff --git a/src/telegram/_inline/inlinequeryresultphoto.py b/src/telegram/_inline/inlinequeryresultphoto.py index b5c5bfb1654..e309d2fb56d 100644 --- a/src/telegram/_inline/inlinequeryresultphoto.py +++ b/src/telegram/_inline/inlinequeryresultphoto.py @@ -54,7 +54,7 @@ class InlineQueryResultPhoto(InlineQueryResult): .. versionadded:: 20.2 - ..versionchanged:: 20.5 + .. versionchanged:: 20.5 |thumbnail_url_mandatory| photo_width (:obj:`int`, optional): Width of the photo. diff --git a/src/telegram/_inline/inlinequeryresultvideo.py b/src/telegram/_inline/inlinequeryresultvideo.py index 8da3e82af86..9c704136838 100644 --- a/src/telegram/_inline/inlinequeryresultvideo.py +++ b/src/telegram/_inline/inlinequeryresultvideo.py @@ -61,7 +61,7 @@ class InlineQueryResultVideo(InlineQueryResult): .. versionadded:: 20.2 - ..versionchanged:: 20.5 + .. versionchanged:: 20.5 |thumbnail_url_mandatory| title (:obj:`str`): Title for the result. diff --git a/src/telegram/_message.py b/src/telegram/_message.py index 16a4cd65ea3..e253db3aa91 100644 --- a/src/telegram/_message.py +++ b/src/telegram/_message.py @@ -690,7 +690,7 @@ class Message(MaybeInaccessibleMessage): effect_id (:obj:`str`): Optional. Unique identifier of the message effect added to the message. - ..versionadded:: 21.3 + .. versionadded:: 21.3 caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. For messages with a Caption. Special entities like usernames, URLs, bot commands, etc. that appear in the diff --git a/src/telegram/_reply.py b/src/telegram/_reply.py index ae2165bd60e..1528dd759be 100644 --- a/src/telegram/_reply.py +++ b/src/telegram/_reply.py @@ -91,7 +91,7 @@ class ExternalReplyInfo(TelegramObject): the file. has_media_spoiler (:obj:`bool`, optional): :obj:`True`, if the message media is covered by a spoiler animation. - checklist (:class:`telegram.Checklist`, optional): Message is a checklist + checklist (:class:`telegram.Checklist`, optional): Message is a checklist. .. versionadded:: 22.3 contact (:class:`telegram.Contact`, optional): Message is a shared contact, information @@ -143,7 +143,7 @@ class ExternalReplyInfo(TelegramObject): the file. has_media_spoiler (:obj:`bool`): Optional. :obj:`True`, if the message media is covered by a spoiler animation. - checklist (:class:`telegram.Checklist`): Optional. Message is a checklist + checklist (:class:`telegram.Checklist`): Optional. Message is a checklist. .. versionadded:: 22.3 contact (:class:`telegram.Contact`): Optional. Message is a shared contact, information diff --git a/src/telegram/constants.py b/src/telegram/constants.py index a403a78e0cd..3e81d350f82 100644 --- a/src/telegram/constants.py +++ b/src/telegram/constants.py @@ -3083,7 +3083,7 @@ class TransactionPartnerType(StringEnum): """:obj:`str`: Transaction with with payment for `paid broadcasting `_. - ..versionadded:: 21.7 + .. versionadded:: 21.7 """ USER = "user" """:obj:`str`: Transaction with a user."""