mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Add missing hints.py file for the previous commit
This commit is contained in:
parent
cd4b915522
commit
89c993f567
60
telethon/hints.py
Normal file
60
telethon/hints.py
Normal file
|
@ -0,0 +1,60 @@
|
|||
import datetime
|
||||
import io
|
||||
import typing
|
||||
|
||||
from . import helpers
|
||||
from .tl import types, custom
|
||||
|
||||
Phone = str
|
||||
Username = str
|
||||
PeerID = int
|
||||
Entity = typing.Union[types.User, types.Chat, types.Channel]
|
||||
FullEntity = typing.Union[types.UserFull, types.messages.ChatFull, types.ChatFull, types.ChannelFull]
|
||||
|
||||
EntityLike = typing.Union[
|
||||
Phone,
|
||||
Username,
|
||||
PeerID,
|
||||
types.TypePeer,
|
||||
types.TypeInputPeer,
|
||||
Entity,
|
||||
FullEntity
|
||||
]
|
||||
EntitiesLike = typing.Union[EntityLike, typing.Sequence[EntityLike]]
|
||||
|
||||
ButtonLike = typing.Union[types.TypeKeyboardButton, custom.Button]
|
||||
MarkupLike = typing.Union[
|
||||
types.TypeReplyMarkup,
|
||||
ButtonLike,
|
||||
typing.Sequence[ButtonLike],
|
||||
typing.Sequence[typing.Sequence[ButtonLike]]
|
||||
]
|
||||
|
||||
TotalList = helpers.TotalList
|
||||
|
||||
DateLike = typing.Optional[float, datetime.datetime, datetime.date, datetime.timedelta]
|
||||
|
||||
|
||||
LocalPath = str
|
||||
ExternalUrl = str
|
||||
BotFileID = str
|
||||
FileLike = typing.Union[
|
||||
LocalPath,
|
||||
ExternalUrl,
|
||||
BotFileID,
|
||||
bytes,
|
||||
io.IOBase,
|
||||
types.TypeMessageMedia,
|
||||
types.TypeInputFile
|
||||
]
|
||||
|
||||
OutFileLike = typing.Union[
|
||||
str,
|
||||
typing.Type[bytes],
|
||||
io.IOBase
|
||||
]
|
||||
|
||||
MessageLike = typing.Union[str, types.Message]
|
||||
MessageIDLike = typing.Union[int, types.Message, types.TypeInputMessage]
|
||||
|
||||
ProgressCallback = typing.Callable[[int, int], None]
|
Loading…
Reference in New Issue
Block a user