Skip to content

Commit 921800f

Browse files
committed
Clean up docstrings
1 parent bc9f902 commit 921800f

21 files changed

Lines changed: 56 additions & 56 deletions

pyrogram/client/methods/bots/request_callback_answer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def request_callback_answer(
2929
message_id: int,
3030
callback_data: bytes
3131
):
32-
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
33-
inline button containing callback data.
32+
"""Use this method to request a callback answer from bots.
33+
This is the equivalent of clicking an inline button containing callback data.
3434
3535
Args:
3636
chat_id (``int`` | ``str``):

pyrogram/client/methods/chats/get_chat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def get_chat(
2828
self,
2929
chat_id: Union[int, str]
3030
) -> "pyrogram.Chat":
31-
"""Use this method to get up to date information about the chat (current name of the user for
32-
one-on-one conversations, current username of a user, group or channel, etc.)
31+
"""Use this method to get up to date information about the chat.
32+
Information include current name of the user for one-on-one conversations, current username of a user, group or
33+
channel, etc.
3334
3435
Args:
3536
chat_id (``int`` | ``str``):

pyrogram/client/methods/chats/get_dialogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_dialogs(
3434
limit: int = 100,
3535
pinned_only: bool = False
3636
) -> "pyrogram.Dialogs":
37-
"""Use this method to get a chunk of the user's dialogs
37+
"""Use this method to get a chunk of the user's dialogs.
3838
3939
You can get up to 100 dialogs at once.
4040
For a more convenient way of getting a user's dialogs see :meth:`iter_dialogs`.

pyrogram/client/methods/chats/restrict_chat_member.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ def restrict_chat_member(
3838
can_invite_users: bool = False,
3939
can_pin_messages: bool = False
4040
) -> Chat:
41-
"""Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for
42-
this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift
43-
restrictions from a user.
41+
"""Use this method to restrict a user in a supergroup.
42+
43+
The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights.
44+
Pass True for all boolean parameters to lift restrictions from a user.
4445
4546
Args:
4647
chat_id (``int`` | ``str``):

pyrogram/client/methods/contacts/delete_contacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def delete_contacts(
2828
self,
2929
ids: List[int]
3030
):
31-
"""Use this method to delete contacts from your Telegram address book
31+
"""Use this method to delete contacts from your Telegram address book.
3232
3333
Args:
3434
ids (List of ``int``):

pyrogram/client/methods/decorators/on_callback_query.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ def on_callback_query(
3030
filters=None,
3131
group: int = 0
3232
) -> callable:
33-
"""Use this decorator to automatically register a function for handling
34-
callback queries. This does the same thing as :meth:`add_handler` using the
35-
:class:`CallbackQueryHandler`.
33+
"""Use this decorator to automatically register a function for handling callback queries.
34+
This does the same thing as :meth:`add_handler` using the :class:`CallbackQueryHandler`.
3635
3736
.. note::
3837
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.

pyrogram/client/methods/decorators/on_deleted_messages.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ def on_deleted_messages(
3030
filters=None,
3131
group: int = 0
3232
) -> callable:
33-
"""Use this decorator to automatically register a function for handling
34-
deleted messages. This does the same thing as :meth:`add_handler` using the
35-
:class:`DeletedMessagesHandler`.
33+
"""Use this decorator to automatically register a function for handling deleted messages.
34+
This does the same thing as :meth:`add_handler` using the :class:`DeletedMessagesHandler`.
3635
3736
.. note::
3837
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.

pyrogram/client/methods/decorators/on_disconnect.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323

2424
class OnDisconnect(BaseClient):
2525
def on_disconnect(self=None) -> callable:
26-
"""Use this decorator to automatically register a function for handling
27-
disconnections. This does the same thing as :meth:`add_handler` using the
28-
:class:`DisconnectHandler`.
26+
"""Use this decorator to automatically register a function for handling disconnections.
27+
This does the same thing as :meth:`add_handler` using the :class:`DisconnectHandler`.
2928
"""
3029

3130
def decorator(func: callable) -> Handler:

pyrogram/client/methods/decorators/on_inline_query.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ def on_inline_query(
3030
filters=None,
3131
group: int = 0
3232
) -> callable:
33-
"""Use this decorator to automatically register a function for handling
34-
inline queries. This does the same thing as :meth:`add_handler` using the
35-
:class:`InlineQueryHandler`.
33+
"""Use this decorator to automatically register a function for handling inline queries.
34+
This does the same thing as :meth:`add_handler` using the :class:`InlineQueryHandler`.
3635
3736
Args:
3837
filters (:obj:`Filters <pyrogram.Filters>`):

pyrogram/client/methods/decorators/on_message.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ def on_message(
3030
filters=None,
3131
group: int = 0
3232
) -> callable:
33-
"""Use this decorator to automatically register a function for handling
34-
messages. This does the same thing as :meth:`add_handler` using the
35-
:class:`MessageHandler`.
33+
"""Use this decorator to automatically register a function for handling messages.
34+
This does the same thing as :meth:`add_handler` using the :class:`MessageHandler`.
3635
3736
.. note::
3837
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.

0 commit comments

Comments
 (0)