From d508e58d497be011d9e30988f47bf27ecec4f124 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 27 Feb 2019 12:59:50 +0100 Subject: [PATCH] Remove the "private" _total parameter --- telethon/client/chats.py | 6 ++---- telethon/client/dialogs.py | 7 ++----- telethon/client/messages.py | 7 ++----- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/telethon/client/chats.py b/telethon/client/chats.py index fbd17454..b310652d 100644 --- a/telethon/client/chats.py +++ b/telethon/client/chats.py @@ -189,7 +189,8 @@ class ChatMethods(UserMethods): def iter_participants( self, entity, limit=None, *, search='', - filter=None, aggressive=False, _total=None): + filter=None, aggressive=False + ): """ 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. - _total (`list`, optional): - A single-item list to pass the total parameter by reference. - Yields: The :tl:`User` objects returned by :tl:`GetParticipantsRequest` with an additional ``.participant`` attribute which is the diff --git a/telethon/client/dialogs.py b/telethon/client/dialogs.py index 453dfdec..75fbf255 100644 --- a/telethon/client/dialogs.py +++ b/telethon/client/dialogs.py @@ -97,8 +97,8 @@ class DialogMethods(UserMethods): def iter_dialogs( self, limit=None, *, offset_date=None, offset_id=0, - offset_peer=types.InputPeerEmpty(), ignore_migrated=False, - _total=None): + offset_peer=types.InputPeerEmpty(), ignore_migrated=False + ): """ Returns an iterator over the dialogs, yielding 'limit' at most. 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 them in the same way official applications do. - _total (`list`, optional): - A single-item list to pass the total parameter by reference. - Yields: Instances of `telethon.tl.custom.dialog.Dialog`. """ diff --git a/telethon/client/messages.py b/telethon/client/messages.py index 7b4b2dfa..c14bddeb 100644 --- a/telethon/client/messages.py +++ b/telethon/client/messages.py @@ -283,8 +283,8 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods): def iter_messages( self, entity, limit=None, *, offset_date=None, offset_id=0, max_id=0, min_id=0, add_offset=0, search=None, filter=None, - from_user=None, wait_time=None, ids=None, reverse=False, - _total=None): + from_user=None, wait_time=None, ids=None, reverse=False + ): """ Iterator over the message history for the specified entity. 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``. - _total (`list`, optional): - A single-item list to pass the total parameter by reference. - Yields: Instances of `telethon.tl.custom.message.Message`.