Fix get_messages type hint (#4357)

This commit is contained in:
Darskiy 2024-04-23 17:54:41 +03:00 committed by GitHub
parent 3625bf849d
commit 3ac11e15ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -553,7 +553,9 @@ class MessageMethods:
scheduled=scheduled scheduled=scheduled
) )
async def get_messages(self: 'TelegramClient', *args, **kwargs) -> 'hints.TotalList': async def get_messages(
self: 'TelegramClient', *args, **kwargs
) -> typing.Union['hints.TotalList', typing.Optional['types.Message']]:
""" """
Same as `iter_messages()`, but returns a Same as `iter_messages()`, but returns a
`TotalList <telethon.helpers.TotalList>` instead. `TotalList <telethon.helpers.TotalList>` instead.