Remove messy subclassing in the TelegramClient

Since it was easy to cause MRO inconsistencies, and it's
not really needed now that self is type hinted as the client.
This commit is contained in:
Lonami Exo
2019-06-24 17:48:46 +02:00
parent 4e80e21ba1
commit b6b4ea669d
13 changed files with 15 additions and 34 deletions

View File

@@ -3,7 +3,6 @@ import itertools
import time
import typing
from .telegrambaseclient import TelegramBaseClient
from .. import errors, utils, hints
from ..errors import MultiError, RPCError
from ..helpers import retry_range
@@ -15,7 +14,7 @@ if typing.TYPE_CHECKING:
from .telegramclient import TelegramClient
class UserMethods(TelegramBaseClient):
class UserMethods:
async def __call__(self: 'TelegramClient', request, ordered=False):
requests = (request if utils.is_list_like(request) else (request,))
for r in requests: