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
This commit is contained in:
zx 2024-08-27 03:40:28 -04:00 committed by GitHub
parent 7377290383
commit 1d08f33f72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2031,7 +2031,7 @@ class Message(Object, Update):
self, self,
document: Union[str, BinaryIO], document: Union[str, BinaryIO],
quote: bool = None, quote: bool = None,
thumb: str = None, thumb: Union[str, BinaryIO] = None,
caption: str = "", caption: str = "",
parse_mode: Optional["enums.ParseMode"] = None, parse_mode: Optional["enums.ParseMode"] = None,
caption_entities: List["types.MessageEntity"] = 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. If *reply_to_message_id* is passed, this parameter will be ignored.
Defaults to ``True`` in group chats and ``False`` in private chats. Defaults to ``True`` in group chats and ``False`` in private chats.
thumb (``str``, *optional*): thumb (``str`` | ``BinaryIO``, *optional*):
Thumbnail of the file sent. Thumbnail of the file sent.
The thumbnail should be in JPEG format and less than 200 KB in size. 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. A thumbnail's width and height should not exceed 320 pixels.