From 1d08f33f72ed536f6496e4becf99efb99dbc4b00 Mon Sep 17 00:00:00 2001 From: zx <109937991+asdfzxcvbn@users.noreply.github.com> Date: Tue, 27 Aug 2024 03:40:28 -0400 Subject: [PATCH] Fix type annotation on `Message.reply_document` (#83) this method is a bound method for `Client.send_document`, where its type annotation for `thumb` is `Union[str, BinaryIO]` therefore, the type annotation in `Message.reply_document` should not differ --- pyrogram/types/messages_and_media/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 0b3cfc55..a00294c3 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -2031,7 +2031,7 @@ class Message(Object, Update): self, document: Union[str, BinaryIO], quote: bool = None, - thumb: str = None, + thumb: Union[str, BinaryIO] = None, caption: str = "", parse_mode: Optional["enums.ParseMode"] = None, caption_entities: List["types.MessageEntity"] = None, @@ -2083,7 +2083,7 @@ class Message(Object, Update): If *reply_to_message_id* is passed, this parameter will be ignored. Defaults to ``True`` in group chats and ``False`` in private chats. - thumb (``str``, *optional*): + thumb (``str`` | ``BinaryIO``, *optional*): Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 KB in size. A thumbnail's width and height should not exceed 320 pixels.