mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 20:20:23 +03:00
fix typehint in resolve_to_packed
This commit is contained in:
parent
11f7617adc
commit
0ae7300cda
|
@ -1,6 +1,6 @@
|
||||||
from __future__ import annotations
|
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 ...mtproto import RpcError
|
||||||
from ...session import PackedChat, PackedType
|
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):
|
if isinstance(chat, PackedChat):
|
||||||
return chat
|
return chat
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user