Skip to content

Commit

Permalink
revert conflicting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
clot27 committed Dec 13, 2022
1 parent 896c85d commit a454dff
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
38 changes: 19 additions & 19 deletions telegram/_files/inputmedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
"""Base class for Telegram InputMedia Objects."""
from typing import Optional, Sequence, Union
from typing import List, Optional, Tuple, Union

from telegram._files.animation import Animation
from telegram._files.audio import Audio
Expand Down Expand Up @@ -55,15 +55,15 @@ class InputMedia(TelegramObject):
caption (:obj:`str`, optional): Caption of the media to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
parsing.
caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
parse_mode (:obj:`str`, optional): |parse_mode|
Attributes:
type (:obj:`str`): Type of the input media.
media (:obj:`str` | :class:`telegram.InputFile`): Media to send.
caption (:obj:`str`): Optional. Caption of the media to be sent.
parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
caption_entities (Sequence[:class:`telegram.MessageEntity`]): Optional. List of special
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption.
"""

Expand All @@ -74,7 +74,7 @@ def __init__(
media_type: str,
media: Union[str, InputFile, MediaType],
caption: str = None,
caption_entities: Sequence[MessageEntity] = None,
caption_entities: Union[List[MessageEntity], Tuple[MessageEntity, ...]] = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
*,
api_kwargs: JSONDict = None,
Expand Down Expand Up @@ -124,7 +124,7 @@ class InputMediaAnimation(InputMedia):
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
width (:obj:`int`, optional): Animation width.
height (:obj:`int`, optional): Animation height.
duration (:obj:`int`, optional): Animation duration in seconds.
Expand All @@ -134,7 +134,7 @@ class InputMediaAnimation(InputMedia):
media (:obj:`str` | :class:`telegram.InputFile`): Animation to send.
caption (:obj:`str`): Optional. Caption of the document to be sent.
parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
caption_entities (Sequence[:class:`telegram.MessageEntity`]): Optional. List of special
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption.
thumb (:class:`telegram.InputFile`): Optional. Thumbnail of the file to send.
width (:obj:`int`): Optional. Animation width.
Expand All @@ -154,7 +154,7 @@ def __init__(
width: int = None,
height: int = None,
duration: int = None,
caption_entities: Sequence[MessageEntity] = None,
caption_entities: Union[List[MessageEntity], Tuple[MessageEntity, ...]] = None,
filename: str = None,
*,
api_kwargs: JSONDict = None,
Expand Down Expand Up @@ -202,14 +202,14 @@ class InputMediaPhoto(InputMedia):
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.PHOTO`.
media (:obj:`str` | :class:`telegram.InputFile`): Photo to send.
caption (:obj:`str`): Optional. Caption of the document to be sent.
parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
caption_entities (Sequence[:class:`telegram.MessageEntity`]): Optional. List of special
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption.
"""
Expand All @@ -221,7 +221,7 @@ def __init__(
media: Union[FileInput, PhotoSize],
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Sequence[MessageEntity] = None,
caption_entities: Union[List[MessageEntity], Tuple[MessageEntity, ...]] = None,
filename: str = None,
*,
api_kwargs: JSONDict = None,
Expand Down Expand Up @@ -266,7 +266,7 @@ class InputMediaVideo(InputMedia):
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
width (:obj:`int`, optional): Video width.
height (:obj:`int`, optional): Video height.
duration (:obj:`int`, optional): Video duration in seconds.
Expand All @@ -283,7 +283,7 @@ class InputMediaVideo(InputMedia):
media (:obj:`str` | :class:`telegram.InputFile`): Video file to send.
caption (:obj:`str`): Optional. Caption of the document to be sent.
parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
caption_entities (Sequence[:class:`telegram.MessageEntity`]): Optional. List of special
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption.
width (:obj:`int`): Optional. Video width.
height (:obj:`int`): Optional. Video height.
Expand All @@ -306,7 +306,7 @@ def __init__(
supports_streaming: bool = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
thumb: FileInput = None,
caption_entities: Sequence[MessageEntity] = None,
caption_entities: Union[List[MessageEntity], Tuple[MessageEntity, ...]] = None,
filename: str = None,
*,
api_kwargs: JSONDict = None,
Expand Down Expand Up @@ -361,7 +361,7 @@ class InputMediaAudio(InputMedia):
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
duration (:obj:`int`): Duration of the audio in seconds as defined by sender.
performer (:obj:`str`, optional): Performer of the audio as defined by sender or by audio
tags.
Expand All @@ -377,7 +377,7 @@ class InputMediaAudio(InputMedia):
media (:obj:`str` | :class:`telegram.InputFile`): Audio file to send.
caption (:obj:`str`): Optional. Caption of the document to be sent.
parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
caption_entities (Sequence[:class:`telegram.MessageEntity`]): Optional. List of special
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption.
duration (:obj:`int`): Duration of the audio in seconds.
performer (:obj:`str`): Optional. Performer of the audio as defined by sender or by audio
Expand All @@ -398,7 +398,7 @@ def __init__(
duration: int = None,
performer: str = None,
title: str = None,
caption_entities: Sequence[MessageEntity] = None,
caption_entities: Union[List[MessageEntity], Tuple[MessageEntity, ...]] = None,
filename: str = None,
*,
api_kwargs: JSONDict = None,
Expand Down Expand Up @@ -446,7 +446,7 @@ class InputMediaDocument(InputMedia):
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
thumb (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
optional): |thumbdocstringnopath|
Expand All @@ -461,7 +461,7 @@ class InputMediaDocument(InputMedia):
media (:obj:`str` | :class:`telegram.InputFile`): File to send.
caption (:obj:`str`): Optional. Caption of the document to be sent.
parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
caption_entities (Sequence[:class:`telegram.MessageEntity`]): Optional. List of special
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption.
thumb (:class:`telegram.InputFile`): Optional. Thumbnail of the file to send.
disable_content_type_detection (:obj:`bool`): Optional. Disables automatic server-side
Expand All @@ -479,7 +479,7 @@ def __init__(
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_content_type_detection: bool = None,
caption_entities: Sequence[MessageEntity] = None,
caption_entities: Union[List[MessageEntity], Tuple[MessageEntity, ...]] = None,
filename: str = None,
*,
api_kwargs: JSONDict = None,
Expand Down
10 changes: 5 additions & 5 deletions telegram/_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,24 +528,24 @@ def __init__(
reply_to_message: "Message" = None,
edit_date: datetime.datetime = None,
text: str = None,
entities: Sequence["MessageEntity"] = None,
caption_entities: Sequence["MessageEntity"] = None,
entities: List["MessageEntity"] = None,
caption_entities: List["MessageEntity"] = None,
audio: Audio = None,
document: Document = None,
game: Game = None,
photo: Sequence[PhotoSize] = None,
photo: List[PhotoSize] = None,
sticker: Sticker = None,
video: Video = None,
voice: Voice = None,
video_note: VideoNote = None,
new_chat_members: Sequence[User] = None,
new_chat_members: List[User] = None,
caption: str = None,
contact: Contact = None,
location: Location = None,
venue: Venue = None,
left_chat_member: User = None,
new_chat_title: str = None,
new_chat_photo: Sequence[PhotoSize] = None,
new_chat_photo: List[PhotoSize] = None,
delete_chat_photo: bool = None,
group_chat_created: bool = None,
supergroup_chat_created: bool = None,
Expand Down

0 comments on commit a454dff

Please sign in to comment.