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,