From 8a5ea705f0e4a0184dd2875dec1becc22c1e9c93 Mon Sep 17 00:00:00 2001 From: Serj Berbeha Date: Thu, 18 Apr 2024 15:29:05 +0300 Subject: [PATCH] fix UserMethods get_entity type hints Fix type hints for get_entity method in UserMethods class to include list of Entity objects --- telethon/client/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/users.py b/telethon/client/users.py index 71c72db3..49f532cf 100644 --- a/telethon/client/users.py +++ b/telethon/client/users.py @@ -222,7 +222,7 @@ class UserMethods: async def get_entity( self: 'TelegramClient', - entity: 'hints.EntitiesLike') -> 'hints.Entity': + entity: 'hints.EntitiesLike') -> typing.Union['hints.Entity', typing.List['hints.Entity']]: """ Turns the given entity into a valid Telegram :tl:`User`, :tl:`Chat` or :tl:`Channel`. You can also pass a list or iterable of entities,