mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-13 11:18:20 +01:00
Correct Some Type Hints (#2118)
* Add string type hint * fixed type hint in send_message() * change type hint of send_chat_action to str * make flaky happy * fixed another type hint in edit_message_text
This commit is contained in:
parent
bf68942c91
commit
83a8874bb5
1 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ from cryptography.hazmat.primitives import serialization
|
|||
from telegram import (User, Message, Update, Chat, ChatMember, UserProfilePhotos, File,
|
||||
ReplyMarkup, TelegramObject, WebhookInfo, GameHighScore, StickerSet,
|
||||
PhotoSize, Audio, Document, Sticker, Video, Animation, Voice, VideoNote,
|
||||
Location, Venue, Contact, InputFile, Poll, BotCommand, ChatAction,
|
||||
Location, Venue, Contact, InputFile, Poll, BotCommand,
|
||||
InlineQueryResult, InputMedia, PassportElementError, MaskPosition,
|
||||
ChatPermissions, ShippingOption, LabeledPrice, ChatPhoto)
|
||||
from telegram.constants import MAX_INLINE_QUERY_RESULTS
|
||||
|
@ -334,7 +334,7 @@ class Bot(TelegramObject):
|
|||
chat_id: Union[int, str],
|
||||
text: str,
|
||||
parse_mode: str = None,
|
||||
disable_web_page_preview: str = None,
|
||||
disable_web_page_preview: bool = None,
|
||||
disable_notification: bool = False,
|
||||
reply_to_message_id: Union[int, str] = None,
|
||||
reply_markup: ReplyMarkup = None,
|
||||
|
@ -1550,7 +1550,7 @@ class Bot(TelegramObject):
|
|||
@log
|
||||
def send_chat_action(self,
|
||||
chat_id: Union[str, int],
|
||||
action: ChatAction,
|
||||
action: str,
|
||||
timeout: float = None,
|
||||
api_kwargs: JSONDict = None) -> bool:
|
||||
"""
|
||||
|
@ -1967,7 +1967,7 @@ class Bot(TelegramObject):
|
|||
message_id: Union[str, int] = None,
|
||||
inline_message_id: Union[str, int] = None,
|
||||
parse_mode: str = None,
|
||||
disable_web_page_preview: str = None,
|
||||
disable_web_page_preview: bool = None,
|
||||
reply_markup: ReplyMarkup = None,
|
||||
timeout: float = None,
|
||||
api_kwargs: JSONDict = None) -> Union[Optional[Message], bool]:
|
||||
|
|
Loading…
Add table
Reference in a new issue