From 2d4305db76d6d5ca587c12af84fbd271b187511d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 20 Sep 2022 18:03:16 +0200 Subject: [PATCH] Wrap buttons typehint in Optional Closes #3762. --- telethon/client/messages.py | 4 ++-- telethon/client/uploads.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/telethon/client/messages.py b/telethon/client/messages.py index 009051b8..2bff203e 100644 --- a/telethon/client/messages.py +++ b/telethon/client/messages.py @@ -618,7 +618,7 @@ class MessageMethods: thumb: 'hints.FileLike' = None, force_document: bool = False, clear_draft: bool = False, - buttons: 'hints.MarkupLike' = None, + buttons: typing.Optional['hints.MarkupLike'] = None, silent: bool = None, background: bool = None, supports_streaming: bool = False, @@ -1030,7 +1030,7 @@ class MessageMethods: file: 'hints.FileLike' = None, thumb: 'hints.FileLike' = None, force_document: bool = False, - buttons: 'hints.MarkupLike' = None, + buttons: typing.Optional['hints.MarkupLike'] = None, supports_streaming: bool = False, schedule: 'hints.DateLike' = None ) -> 'types.Message': diff --git a/telethon/client/uploads.py b/telethon/client/uploads.py index 4c9f9d32..a0df1b59 100644 --- a/telethon/client/uploads.py +++ b/telethon/client/uploads.py @@ -110,7 +110,7 @@ class UploadMethods: formatting_entities: typing.Optional[typing.List[types.TypeMessageEntity]] = None, voice_note: bool = False, video_note: bool = False, - buttons: 'hints.MarkupLike' = None, + buttons: typing.Optional['hints.MarkupLike'] = None, silent: bool = None, background: bool = None, supports_streaming: bool = False,