From e1f328e5f11e05a0b6180fcf3f5ed7578727afca Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Sat, 13 Apr 2024 00:31:54 +0530 Subject: [PATCH] fixing union for python <= 3.9 --- telethon/client/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/client/auth.py b/telethon/client/auth.py index 8592b1ef..52d671ac 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -19,8 +19,8 @@ class AuthMethods: def start( self: 'TelegramClient', - phone: typing.Callable[[], str] | str = lambda: input('Please enter your phone (or bot token): '), - password: typing.Callable[[], str] | str = lambda: getpass.getpass('Please enter your password: '), + phone: typing.Union[typing.Callable[[], str], str] = lambda: input('Please enter your phone (or bot token): '), + password: typing.Union[typing.Callable[[], str], str] = lambda: getpass.getpass('Please enter your password: '), *, bot_token: str = None, force_sms: bool = False,