mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-09 02:20:36 +00:00
Apply several lints
This commit is contained in:
@@ -14,6 +14,10 @@ class ChatGetter(abc.ABC):
|
||||
`_input_chat`, `_chat_peer`, `_broadcast` and `_client`. As an end
|
||||
user, you should not worry about this.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._chat = self._input_chat = self._chat_peer = \
|
||||
self._client = self._broadcast = None
|
||||
|
||||
@property
|
||||
def chat(self):
|
||||
"""
|
||||
|
||||
@@ -56,6 +56,7 @@ class InlineBuilder:
|
||||
def __init__(self, client):
|
||||
self._client = client
|
||||
|
||||
# noinspection PyIncorrectDocstring
|
||||
async def article(
|
||||
self, title, description=None,
|
||||
*, url=None, thumb=None, content=None,
|
||||
@@ -107,6 +108,7 @@ class InlineBuilder:
|
||||
|
||||
return result
|
||||
|
||||
# noinspection PyIncorrectDocstring
|
||||
async def photo(
|
||||
self, file, *, id=None,
|
||||
text=None, parse_mode=(), link_preview=True,
|
||||
@@ -154,6 +156,7 @@ class InlineBuilder:
|
||||
|
||||
return result
|
||||
|
||||
# noinspection PyIncorrectDocstring
|
||||
async def document(
|
||||
self, file, title=None, *, description=None, type=None,
|
||||
mime_type=None, attributes=None, force_document=False,
|
||||
@@ -236,6 +239,7 @@ class InlineBuilder:
|
||||
|
||||
return result
|
||||
|
||||
# noinspection PyIncorrectDocstring
|
||||
async def game(
|
||||
self, short_name, *, id=None,
|
||||
text=None, parse_mode=(), link_preview=True,
|
||||
|
||||
@@ -519,12 +519,12 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
|
||||
@property
|
||||
def action_entities(self):
|
||||
"""
|
||||
Returns a list of entities that can took part in this action.
|
||||
Returns a list of entities that took part in this action.
|
||||
|
||||
Possible cases for this are :tl:`MessageActionChatAddUser`,
|
||||
:tl:`types.MessageActionChatCreate`, :tl:`MessageActionChatDeleteUser`,
|
||||
:tl:`MessageActionChatJoinedByLink` :tl:`MessageActionChatMigrateTo`
|
||||
and :tl:`MessageActionChannelMigrateFrom).
|
||||
and :tl:`MessageActionChannelMigrateFrom`.
|
||||
|
||||
If the action is neither of those, the result will be ``None``.
|
||||
If some entities could not be retrieved, the list may contain
|
||||
|
||||
@@ -11,6 +11,10 @@ class SenderGetter(abc.ABC):
|
||||
`_input_sender`, `_sender_id` and `_client`. As an end user, you
|
||||
should not worry about this.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._sender = self._input_sender = self._sender_id = \
|
||||
self._client = None
|
||||
|
||||
@property
|
||||
def sender(self):
|
||||
"""
|
||||
@@ -79,3 +83,9 @@ class SenderGetter(abc.ABC):
|
||||
"""
|
||||
Re-fetches sender information through other means.
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
async def _reload_message(self):
|
||||
"""
|
||||
Subclasses should implement message reloading.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user