mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 02:43:45 +03:00
Fix errors reported by tools/check
This commit is contained in:
parent
4a591cee8a
commit
edf3e06bd0
|
@ -102,6 +102,16 @@ Private definitions
|
|||
|
||||
Generic parameter used by :class:`AsyncList`.
|
||||
|
||||
.. currentmodule:: telethon._impl.client.types.keyboard
|
||||
|
||||
.. class:: AnyButton
|
||||
|
||||
Generic parameter used by :class:`Keyboard`.
|
||||
|
||||
.. class:: AnyInlineButton
|
||||
|
||||
Generic parameter used by :class:`InlineKeyboard`.
|
||||
|
||||
.. currentmodule:: telethon._impl.client.events.filters.combinators
|
||||
|
||||
.. autoclass:: Combinable
|
||||
|
|
|
@ -253,9 +253,9 @@ class Client:
|
|||
self._message_box = MessageBox(base_logger=base_logger)
|
||||
self._chat_hashes = ChatHashCache(None)
|
||||
self._last_update_limit_warn: Optional[float] = None
|
||||
self._updates: asyncio.Queue[tuple[abcs.Update, dict[int, Peer]]] = (
|
||||
asyncio.Queue(maxsize=self._config.update_queue_limit or 0)
|
||||
)
|
||||
self._updates: asyncio.Queue[
|
||||
tuple[abcs.Update, dict[int, Peer]]
|
||||
] = asyncio.Queue(maxsize=self._config.update_queue_limit or 0)
|
||||
self._dispatcher: Optional[asyncio.Task[None]] = None
|
||||
self._handlers: dict[
|
||||
Type[Event],
|
||||
|
|
|
@ -14,7 +14,13 @@ from .file import (
|
|||
try_get_url_path,
|
||||
)
|
||||
from .inline_result import InlineResult
|
||||
from .keyboard import InlineKeyboard, Keyboard, KeyboardType
|
||||
from .keyboard import (
|
||||
ForcedReplyKeyboard,
|
||||
HiddenKeyboard,
|
||||
InlineKeyboard,
|
||||
Keyboard,
|
||||
KeyboardType,
|
||||
)
|
||||
from .login_token import LoginToken
|
||||
from .message import (
|
||||
Message,
|
||||
|
@ -61,7 +67,9 @@ __all__ = [
|
|||
"Participant",
|
||||
"PasswordToken",
|
||||
"RecentAction",
|
||||
"Keyboard",
|
||||
"ForcedReplyKeyboard",
|
||||
"HiddenKeyboard",
|
||||
"InlineKeyboard",
|
||||
"Keyboard",
|
||||
"KeyboardType",
|
||||
]
|
||||
|
|
|
@ -18,7 +18,7 @@ try:
|
|||
)
|
||||
|
||||
except ImportError:
|
||||
import pyaes # type: ignore [import-untyped]
|
||||
import pyaes
|
||||
|
||||
def ige_encrypt(
|
||||
plaintext: bytes | bytearray | memoryview, key: bytes, iv: bytes
|
||||
|
|
|
@ -9,7 +9,8 @@ if TYPE_CHECKING:
|
|||
from .serializable import Serializable
|
||||
|
||||
class Buffer(Protocol):
|
||||
def __buffer__(self, flags: int, /) -> memoryview: ...
|
||||
def __buffer__(self, flags: int, /) -> memoryview:
|
||||
...
|
||||
|
||||
|
||||
AnySerializable = TypeVar("AnySerializable", bound="Serializable")
|
||||
|
|
|
@ -12,7 +12,9 @@ from .._impl.client.types import (
|
|||
Dialog,
|
||||
Draft,
|
||||
File,
|
||||
ForcedReplyKeyboard,
|
||||
Group,
|
||||
HiddenKeyboard,
|
||||
InlineKeyboard,
|
||||
InlineResult,
|
||||
Keyboard,
|
||||
|
@ -38,7 +40,9 @@ __all__ = [
|
|||
"Dialog",
|
||||
"Draft",
|
||||
"File",
|
||||
"ForcedReplyKeyboard",
|
||||
"Group",
|
||||
"HiddenKeyboard",
|
||||
"InlineKeyboard",
|
||||
"InlineResult",
|
||||
"Keyboard",
|
||||
|
|
|
@ -123,7 +123,12 @@ def main() -> None:
|
|||
|
||||
generated = ast.unparse(
|
||||
ast.ClassDef(
|
||||
name="Client", bases=[], keywords=[], body=class_body, decorator_list=[]
|
||||
name="Client",
|
||||
bases=[],
|
||||
keywords=[],
|
||||
body=class_body,
|
||||
decorator_list=[],
|
||||
type_params=[],
|
||||
)
|
||||
)[len("class Client:") :].strip()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user