Skip to content

Commit 47dd13f

Browse files
authored
Merge pull request #2475 from GameRoMan/patch-1
Fix type annotations
2 parents 57f9e80 + ad5a711 commit 47dd13f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

telebot/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3528,7 +3528,7 @@ def edit_message_live_location(
35283528
proximity_alert_radius: Optional[int]=None,
35293529
live_period: Optional[int]=None,
35303530
business_connection_id: Optional[str]=None
3531-
) -> types.Message or bool:
3531+
) -> Union[types.Message, bool]:
35323532
"""
35333533
Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly
35343534
disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message
@@ -3590,7 +3590,7 @@ def stop_message_live_location(
35903590
inline_message_id: Optional[str]=None,
35913591
reply_markup: Optional[types.InlineKeyboardMarkup]=None,
35923592
timeout: Optional[int]=None,
3593-
business_connection_id: Optional[str]=None) -> types.Message or bool:
3593+
business_connection_id: Optional[str]=None) -> Union[types.Message, bool]:
35943594
"""
35953595
Use this method to stop updating a live location message before live_period expires.
35963596
On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.

telebot/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def extract_command(text: str) -> Union[str, None]:
255255
return text.split()[0].split('@')[0][1:] if is_command(text) else None
256256

257257

258-
def extract_arguments(text: str) -> str or None:
258+
def extract_arguments(text: str) -> Union[str, None]:
259259
"""
260260
Returns the argument after the command.
261261

0 commit comments

Comments
 (0)