mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-08 01:41:59 +00:00
Use relative imports always where possible
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
import telethon.helpers as utils
|
||||
from telethon.crypto import AES, RSA, AuthKey, Factorizator
|
||||
from telethon.network import MtProtoPlainSender
|
||||
from telethon.utils import BinaryReader, BinaryWriter
|
||||
from .. import helpers as utils
|
||||
from ..crypto import AES, RSA, AuthKey, Factorizator
|
||||
from ..network import MtProtoPlainSender
|
||||
from ..utils import BinaryReader, BinaryWriter
|
||||
|
||||
|
||||
def do_authentication(transport):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import random
|
||||
import time
|
||||
|
||||
from telethon.utils import BinaryReader, BinaryWriter
|
||||
from ..utils import BinaryReader, BinaryWriter
|
||||
|
||||
|
||||
class MtProtoPlainSender:
|
||||
|
||||
@@ -3,14 +3,15 @@ from datetime import timedelta
|
||||
from threading import Event, RLock, Thread
|
||||
from time import sleep, time
|
||||
|
||||
import telethon.helpers as utils
|
||||
from telethon.crypto import AES
|
||||
from telethon.errors import *
|
||||
from telethon.tl.all_tlobjects import tlobjects
|
||||
from telethon.tl.functions.updates import GetStateRequest
|
||||
from telethon.tl.types import MsgsAck
|
||||
from telethon.tl.functions import PingRequest
|
||||
from telethon.utils import BinaryReader, BinaryWriter
|
||||
from .. import helpers as utils
|
||||
from ..crypto import AES
|
||||
from ..errors import (BadMessageError, RPCError,
|
||||
InvalidDCError, ReadCancelledError)
|
||||
from ..tl.all_tlobjects import tlobjects
|
||||
from ..tl.functions import PingRequest
|
||||
from ..tl.functions.updates import GetStateRequest
|
||||
from ..tl.types import MsgsAck
|
||||
from ..utils import BinaryReader, BinaryWriter
|
||||
|
||||
import logging
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
@@ -4,8 +4,8 @@ import time
|
||||
from datetime import datetime, timedelta
|
||||
from threading import Event, Lock
|
||||
|
||||
from telethon.errors import ReadCancelledError
|
||||
from telethon.utils import BinaryWriter
|
||||
from ..errors import ReadCancelledError
|
||||
from ..utils import BinaryWriter
|
||||
|
||||
|
||||
class TcpClient:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from binascii import crc32
|
||||
from datetime import timedelta
|
||||
|
||||
from telethon.errors import *
|
||||
from telethon.network import TcpClient
|
||||
from telethon.utils import BinaryWriter
|
||||
from ..errors import InvalidChecksumError
|
||||
from ..network import TcpClient
|
||||
from ..utils import BinaryWriter
|
||||
|
||||
|
||||
class TcpTransport:
|
||||
|
||||
Reference in New Issue
Block a user