mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Significantly clean-up imports
Sure wish I would've automated this.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from telethon._impl.crypto.auth_key import AuthKey
|
||||
from telethon._impl.crypto import AuthKey
|
||||
|
||||
|
||||
def get_auth_key() -> AuthKey:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from telethon._impl.crypto.auth_key import AuthKey
|
||||
from telethon._impl.crypto import AuthKey
|
||||
from telethon._impl.mtproto.authentication import (
|
||||
CreatedKey,
|
||||
_do_step1,
|
||||
|
@@ -2,10 +2,8 @@ import os
|
||||
import random
|
||||
|
||||
from pytest import mark
|
||||
from telethon._impl.client.client.client import Client
|
||||
from telethon._impl.client.client.net import Config
|
||||
from telethon._impl.session.message_box.defs import Session
|
||||
from telethon._impl.tl.mtproto import functions, types
|
||||
from telethon import Client, Config, Session
|
||||
from telethon import _tl as tl
|
||||
|
||||
|
||||
@mark.api
|
||||
@@ -27,6 +25,6 @@ async def test_ping_pong() -> None:
|
||||
assert client.connected
|
||||
|
||||
ping_id = random.randrange(-(2**63), 2**63)
|
||||
pong = await client(functions.ping(ping_id=ping_id))
|
||||
assert isinstance(pong, types.Pong)
|
||||
pong = await client(tl.mtproto.functions.ping(ping_id=ping_id))
|
||||
assert isinstance(pong, tl.mtproto.types.Pong)
|
||||
assert pong.ping_id == ping_id
|
||||
|
@@ -1,13 +1,13 @@
|
||||
from telethon._impl.crypto import (
|
||||
AuthKey,
|
||||
Side,
|
||||
_do_encrypt_data_v2,
|
||||
calc_key,
|
||||
decrypt_data_v2,
|
||||
decrypt_ige,
|
||||
encrypt_ige,
|
||||
generate_key_data_from_nonce,
|
||||
)
|
||||
from telethon._impl.crypto.auth_key import AuthKey
|
||||
from telethon._impl.crypto.crypto import _do_encrypt_data_v2
|
||||
|
||||
|
||||
def get_test_auth_key() -> AuthKey:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from telethon._impl.crypto.factorize import factorize
|
||||
from telethon._impl.crypto import factorize
|
||||
|
||||
|
||||
def test_factorization_1() -> None:
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import struct
|
||||
|
||||
from pytest import raises
|
||||
from telethon._impl.crypto.auth_key import AuthKey
|
||||
from telethon._impl.mtproto.mtp import Encrypted, Plain, RpcError
|
||||
from telethon._impl.crypto import AuthKey
|
||||
from telethon._impl.mtproto import Encrypted, Plain, RpcError
|
||||
from telethon._impl.tl.mtproto.types import RpcError as GeneratedRpcError
|
||||
|
||||
|
||||
|
@@ -2,8 +2,8 @@ import asyncio
|
||||
import logging
|
||||
|
||||
from pytest import LogCaptureFixture, mark
|
||||
from telethon._impl.mtproto.transport.full import Full
|
||||
from telethon._impl.mtsender.sender import connect
|
||||
from telethon._impl.mtproto import Full
|
||||
from telethon._impl.mtsender import connect
|
||||
from telethon._impl.tl import LAYER, abcs, functions, types
|
||||
|
||||
TELEGRAM_TEST_DC_2 = "149.154.167.40:443"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from telethon._impl.session.chat.packed import PackedChat, PackedType
|
||||
from telethon._impl.session import PackedChat, PackedType
|
||||
|
||||
|
||||
def test_hash_optional() -> None:
|
||||
|
@@ -1,8 +1,7 @@
|
||||
import struct
|
||||
|
||||
from pytest import mark
|
||||
from telethon._impl.tl.core import Reader
|
||||
from telethon._impl.tl.core.serializable import Serializable
|
||||
from telethon._impl.tl.core import Reader, Serializable
|
||||
from telethon._impl.tl.mtproto.types import BadServerSalt
|
||||
from telethon._impl.tl.types import GeoPoint
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from typing import Tuple
|
||||
|
||||
from pytest import raises
|
||||
from telethon._impl.mtproto.transport.abridged import Abridged
|
||||
from telethon._impl.mtproto import Abridged
|
||||
|
||||
|
||||
class Output(bytearray):
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from typing import Tuple
|
||||
|
||||
from pytest import raises
|
||||
from telethon._impl.mtproto.transport.full import Full
|
||||
from telethon._impl.mtproto import Full
|
||||
|
||||
|
||||
class Output(bytearray):
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from typing import Tuple
|
||||
|
||||
from pytest import raises
|
||||
from telethon._impl.mtproto.transport.intermediate import Intermediate
|
||||
from telethon._impl.mtproto import Intermediate
|
||||
|
||||
|
||||
class Output(bytearray):
|
||||
|
Reference in New Issue
Block a user