mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-27 08:19:47 +03:00
Fix type annotations
This commit is contained in:
parent
6e72bf9179
commit
0f3c91eff7
|
@ -4,7 +4,7 @@ from collections.abc import AsyncIterator
|
|||
from typing import TYPE_CHECKING, Optional, Self
|
||||
|
||||
from ...session import PeerRef, UserRef
|
||||
from ...tl import functions, types
|
||||
from ...tl import abcs, functions, types
|
||||
from ..types import InlineResult, NoPublicConstructor, Peer, User
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -15,7 +15,7 @@ class InlineResults(metaclass=NoPublicConstructor):
|
|||
def __init__(
|
||||
self,
|
||||
client: Client,
|
||||
bot: types.InputUser,
|
||||
bot: abcs.InputUser,
|
||||
query: str,
|
||||
peer: Optional[PeerRef],
|
||||
):
|
||||
|
|
|
@ -66,9 +66,9 @@ async def resolve_username(self: Client, username: str, /) -> Peer:
|
|||
|
||||
async def resolve_peers(self: Client, peers: Sequence[Peer | PeerRef], /) -> list[Peer]:
|
||||
refs: list[PeerRef] = []
|
||||
input_users: list[types.InputUser] = []
|
||||
input_users: list[abcs.InputUser] = []
|
||||
input_chats: list[int] = []
|
||||
input_channels: list[types.InputChannel] = []
|
||||
input_channels: list[abcs.InputChannel] = []
|
||||
|
||||
for peer in peers:
|
||||
peer = peer._ref
|
||||
|
|
|
@ -35,7 +35,7 @@ class Combinable(abc.ABC):
|
|||
return self.filter if isinstance(self, Not) else Not(self)
|
||||
|
||||
@abc.abstractmethod
|
||||
async def __call__(self, event: Event) -> bool:
|
||||
def __call__(self, event: Event) -> bool | Awaitable[bool]:
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user