From d3a201a277fd98bcea47f92269b907ba9607b2d1 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Sat, 13 Apr 2024 00:36:15 +0530 Subject: [PATCH] Fix regression on supported Python version (#4347) --- 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,