fixing union for python <= 3.9

This commit is contained in:
Shubham Kumar 2024-04-13 00:31:54 +05:30
parent 49a8f111d3
commit e1f328e5f1

View File

@ -19,8 +19,8 @@ class AuthMethods:
def start( def start(
self: 'TelegramClient', self: 'TelegramClient',
phone: typing.Callable[[], str] | str = lambda: input('Please enter your phone (or bot token): '), phone: typing.Union[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: '), password: typing.Union[typing.Callable[[], str], str] = lambda: getpass.getpass('Please enter your password: '),
*, *,
bot_token: str = None, bot_token: str = None,
force_sms: bool = False, force_sms: bool = False,