From 0ae7300cdacdd931fbf0551cc54b59b1332dbf8e Mon Sep 17 00:00:00 2001 From: apepenkov Date: Fri, 10 Nov 2023 00:14:05 +0300 Subject: [PATCH] fix typehint in resolve_to_packed --- client/src/telethon/_impl/client/client/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/telethon/_impl/client/client/users.py b/client/src/telethon/_impl/client/client/users.py index 7ccbddd5..020e13b9 100644 --- a/client/src/telethon/_impl/client/client/users.py +++ b/client/src/telethon/_impl/client/client/users.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Sequence +from typing import TYPE_CHECKING, List, Optional, Sequence, Union from ...mtproto import RpcError from ...session import PackedChat, PackedType @@ -117,7 +117,7 @@ async def get_chats(self: Client, chats: Sequence[ChatLike]) -> List[Chat]: ] -async def resolve_to_packed(client: Client, chat: ChatLike) -> PackedChat: +async def resolve_to_packed(client: Client, chat: Union[ChatLike, abcs.InputPeer, abcs.Peer]) -> PackedChat: if isinstance(chat, PackedChat): return chat