From 90136f0de5243d58ee5df88a7729fc427ff5cd78 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 4 Jun 2024 18:29:17 +0000 Subject: [PATCH] (trivial) fix some import orders 1. stdlib 2. 3rd-party 3. internal (as in PEP-8) --- electrum/descriptor.py | 20 +++++++++----------- electrum/lnrouter.py | 3 ++- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/electrum/descriptor.py b/electrum/descriptor.py index e2904f3f2..94c0f4a85 100644 --- a/electrum/descriptor.py +++ b/electrum/descriptor.py @@ -14,18 +14,8 @@ # TODO impl ADDR descriptors # TODO impl RAW descriptors -import enum - -from .bip32 import convert_bip32_strpath_to_intpath, BIP32Node, KeyOriginInfo, BIP32_PRIME -from . import bitcoin -from .bitcoin import construct_script, opcodes, construct_witness -from . import constants -from .crypto import hash_160, sha256 -from . import ecc -from . import segwit_addr -from .util import bfh - from binascii import unhexlify +import enum from enum import Enum from typing import ( List, @@ -37,6 +27,14 @@ from typing import ( Set, ) +from .bip32 import convert_bip32_strpath_to_intpath, BIP32Node, KeyOriginInfo, BIP32_PRIME +from . import bitcoin +from .bitcoin import construct_script, opcodes, construct_witness +from . import constants +from .crypto import hash_160, sha256 +from . import ecc +from . import segwit_addr + MAX_TAPROOT_NODES = 128 diff --git a/electrum/lnrouter.py b/electrum/lnrouter.py index afd813ea3..cab174321 100644 --- a/electrum/lnrouter.py +++ b/electrum/lnrouter.py @@ -29,9 +29,10 @@ from typing import Sequence, Tuple, Optional, Dict, TYPE_CHECKING, Set import time import threading from threading import RLock -import attr from math import inf +import attr + from .util import profiler, with_lock from .logging import Logger from .lnutil import (NUM_MAX_EDGES_IN_PAYMENT_PATH, ShortChannelID, LnFeatures,