mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-18 04:20:57 +03:00
Replace super calls with simply super()
This commit is contained in:
parent
843c16215c
commit
20956b23d1
|
@ -139,13 +139,13 @@ class TelegramClient(TelegramBareClient):
|
||||||
|
|
||||||
*args will be ignored.
|
*args will be ignored.
|
||||||
"""
|
"""
|
||||||
return super(TelegramClient, self).connect()
|
return super().connect()
|
||||||
|
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
"""Disconnects from the Telegram server
|
"""Disconnects from the Telegram server
|
||||||
and stops all the spawned threads"""
|
and stops all the spawned threads"""
|
||||||
self._set_updates_thread(running=False)
|
self._set_updates_thread(running=False)
|
||||||
super(TelegramClient, self).disconnect()
|
super().disconnect()
|
||||||
|
|
||||||
# Also disconnect all the cached senders
|
# Also disconnect all the cached senders
|
||||||
for sender in self._cached_clients.values():
|
for sender in self._cached_clients.values():
|
||||||
|
@ -257,7 +257,7 @@ class TelegramClient(TelegramBareClient):
|
||||||
self._lock.acquire()
|
self._lock.acquire()
|
||||||
|
|
||||||
updates = [] if self._update_handlers else None
|
updates = [] if self._update_handlers else None
|
||||||
result = super(TelegramClient, self).invoke(
|
result = super().invoke(
|
||||||
request, updates=updates
|
request, updates=updates
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -729,7 +729,7 @@ class TelegramClient(TelegramBareClient):
|
||||||
"""
|
"""
|
||||||
if on_dc is None:
|
if on_dc is None:
|
||||||
try:
|
try:
|
||||||
super(TelegramClient, self).download_file(
|
super().download_file(
|
||||||
input_location,
|
input_location,
|
||||||
file,
|
file,
|
||||||
part_size_kb=part_size_kb,
|
part_size_kb=part_size_kb,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user