mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Optimize imports
This commit is contained in:
parent
e05c6a76d5
commit
ebc34e71d3
@ -50,12 +50,11 @@ from pyrogram.crypto import AES
|
||||
from pyrogram.session import Auth, Session
|
||||
from pyrogram.session.internals import MsgId
|
||||
from . import message_parser
|
||||
from .dispatcher import Dispatcher
|
||||
from . import utils
|
||||
from .dispatcher import Dispatcher
|
||||
from .input_media import InputMedia
|
||||
from .style import Markdown, HTML
|
||||
from .syncer import Syncer
|
||||
from .utils import decode
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -1182,7 +1181,7 @@ class Client:
|
||||
)
|
||||
else:
|
||||
try:
|
||||
decoded = decode(photo)
|
||||
decoded = utils.decode(photo)
|
||||
fmt = "<iiqqqqi" if len(decoded) > 24 else "<iiqq"
|
||||
unpacked = struct.unpack(fmt, decoded)
|
||||
except (AssertionError, binascii.Error, struct.error):
|
||||
@ -1318,7 +1317,7 @@ class Client:
|
||||
)
|
||||
else:
|
||||
try:
|
||||
decoded = decode(audio)
|
||||
decoded = utils.decode(audio)
|
||||
fmt = "<iiqqqqi" if len(decoded) > 24 else "<iiqq"
|
||||
unpacked = struct.unpack(fmt, decoded)
|
||||
except (AssertionError, binascii.Error, struct.error):
|
||||
|
Loading…
x
Reference in New Issue
Block a user