Remove the "private" _total parameter

This commit is contained in:
Lonami Exo 2019-02-27 12:59:50 +01:00
parent bf71e49fcc
commit d508e58d49
3 changed files with 6 additions and 14 deletions

View File

@ -189,7 +189,8 @@ class ChatMethods(UserMethods):
def iter_participants( def iter_participants(
self, entity, limit=None, *, search='', self, entity, limit=None, *, search='',
filter=None, aggressive=False, _total=None): filter=None, aggressive=False
):
""" """
Iterator over the participants belonging to the specified chat. Iterator over the participants belonging to the specified chat.
@ -227,9 +228,6 @@ class ChatMethods(UserMethods):
This has no effect if a ``filter`` is given. This has no effect if a ``filter`` is given.
_total (`list`, optional):
A single-item list to pass the total parameter by reference.
Yields: Yields:
The :tl:`User` objects returned by :tl:`GetParticipantsRequest` The :tl:`User` objects returned by :tl:`GetParticipantsRequest`
with an additional ``.participant`` attribute which is the with an additional ``.participant`` attribute which is the

View File

@ -97,8 +97,8 @@ class DialogMethods(UserMethods):
def iter_dialogs( def iter_dialogs(
self, limit=None, *, offset_date=None, offset_id=0, self, limit=None, *, offset_date=None, offset_id=0,
offset_peer=types.InputPeerEmpty(), ignore_migrated=False, offset_peer=types.InputPeerEmpty(), ignore_migrated=False
_total=None): ):
""" """
Returns an iterator over the dialogs, yielding 'limit' at most. Returns an iterator over the dialogs, yielding 'limit' at most.
Dialogs are the open "chats" or conversations with other people, Dialogs are the open "chats" or conversations with other people,
@ -127,9 +127,6 @@ class DialogMethods(UserMethods):
dialogs are returned, but setting this to ``True`` will hide dialogs are returned, but setting this to ``True`` will hide
them in the same way official applications do. them in the same way official applications do.
_total (`list`, optional):
A single-item list to pass the total parameter by reference.
Yields: Yields:
Instances of `telethon.tl.custom.dialog.Dialog`. Instances of `telethon.tl.custom.dialog.Dialog`.
""" """

View File

@ -283,8 +283,8 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
def iter_messages( def iter_messages(
self, entity, limit=None, *, offset_date=None, offset_id=0, self, entity, limit=None, *, offset_date=None, offset_id=0,
max_id=0, min_id=0, add_offset=0, search=None, filter=None, max_id=0, min_id=0, add_offset=0, search=None, filter=None,
from_user=None, wait_time=None, ids=None, reverse=False, from_user=None, wait_time=None, ids=None, reverse=False
_total=None): ):
""" """
Iterator over the message history for the specified entity. Iterator over the message history for the specified entity.
If either `search`, `filter` or `from_user` are provided, If either `search`, `filter` or `from_user` are provided,
@ -377,9 +377,6 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
You cannot use this if both `entity` and `ids` are ``None``. You cannot use this if both `entity` and `ids` are ``None``.
_total (`list`, optional):
A single-item list to pass the total parameter by reference.
Yields: Yields:
Instances of `telethon.tl.custom.message.Message`. Instances of `telethon.tl.custom.message.Message`.