Use relative imports always where possible

This commit is contained in:
Lonami Exo
2017-05-21 13:02:54 +02:00
parent ca80b05694
commit 63c89af983
17 changed files with 104 additions and 81 deletions
+4 -4
View File
@@ -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 -1
View File
@@ -1,7 +1,7 @@
import random
import time
from telethon.utils import BinaryReader, BinaryWriter
from ..utils import BinaryReader, BinaryWriter
class MtProtoPlainSender:
+9 -8
View File
@@ -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())
+2 -2
View File
@@ -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:
+3 -3
View File
@@ -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: