Skip to content

Commit

Permalink
Merge pull request #1854 from Cub11k/master
Browse files Browse the repository at this point in the history
Fixed typehints for reply markup in editing methods
  • Loading branch information
Badiboy authored Dec 30, 2022
2 parents 81600cf + 3812fd0 commit ba64180
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions telebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2551,7 +2551,7 @@ def edit_message_live_location(
chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
reply_markup: Optional[types.InlineKeyboardMarkup]=None,
timeout: Optional[int]=None,
horizontal_accuracy: Optional[float]=None,
heading: Optional[int]=None,
Expand Down Expand Up @@ -2607,7 +2607,7 @@ def stop_message_live_location(
self, chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
reply_markup: Optional[types.InlineKeyboardMarkup]=None,
timeout: Optional[int]=None) -> types.Message or bool:
"""
Use this method to stop updating a live location message before live_period expires.
Expand Down Expand Up @@ -3592,7 +3592,7 @@ def edit_message_text(
parse_mode: Optional[str]=None,
entities: Optional[List[types.MessageEntity]]=None,
disable_web_page_preview: Optional[bool]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit text and game messages.
Expand Down Expand Up @@ -3638,7 +3638,7 @@ def edit_message_media(
self, media: Any, chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit animation, audio, document, photo, or video messages.
If a message is a part of a message album, then it can be edited only to a photo or a video.
Expand Down Expand Up @@ -3673,7 +3673,7 @@ def edit_message_reply_markup(
self, chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit only the reply markup of messages.
Expand Down Expand Up @@ -4264,7 +4264,7 @@ def edit_message_caption(
inline_message_id: Optional[str]=None,
parse_mode: Optional[str]=None,
caption_entities: Optional[List[types.MessageEntity]]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit captions of messages.
Expand Down
12 changes: 6 additions & 6 deletions telebot/async_telebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3409,7 +3409,7 @@ async def edit_message_live_location(
chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
reply_markup: Optional[types.InlineKeyboardMarkup]=None,
timeout: Optional[int]=None,
horizontal_accuracy: Optional[float]=None,
heading: Optional[int]=None,
Expand Down Expand Up @@ -3465,7 +3465,7 @@ async def stop_message_live_location(
self, chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
reply_markup: Optional[types.InlineKeyboardMarkup]=None,
timeout: Optional[int]=None) -> types.Message:
"""
Use this method to stop updating a live location message before live_period expires.
Expand Down Expand Up @@ -4458,7 +4458,7 @@ async def edit_message_text(
parse_mode: Optional[str]=None,
entities: Optional[List[types.MessageEntity]]=None,
disable_web_page_preview: Optional[bool]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit text and game messages.
Expand Down Expand Up @@ -4504,7 +4504,7 @@ async def edit_message_media(
self, media: Any, chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit animation, audio, document, photo, or video messages.
If a message is a part of a message album, then it can be edited only to a photo or a video.
Expand Down Expand Up @@ -4539,7 +4539,7 @@ async def edit_message_reply_markup(
self, chat_id: Optional[Union[int, str]]=None,
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit only the reply markup of messages.
Expand Down Expand Up @@ -5128,7 +5128,7 @@ async def edit_message_caption(
inline_message_id: Optional[str]=None,
parse_mode: Optional[str]=None,
caption_entities: Optional[List[types.MessageEntity]]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> Union[types.Message, bool]:
"""
Use this method to edit captions of messages.
Expand Down

0 comments on commit ba64180

Please sign in to comment.