[CHORE] flake8 issues E402, E721 and F821 (#1874)
* F821: undefine name disabled and logged webhook_listener for opennode and lnpay because they are obviously not working * E402: module level import not at top of file * E721 fixes, only popped up for python3.9 not 3.10
This commit is contained in:
+14
-15
@@ -1,10 +1,3 @@
|
||||
imports_ok = True
|
||||
try:
|
||||
import grpc
|
||||
from grpc import RpcError
|
||||
except ImportError: # pragma: nocover
|
||||
imports_ok = False
|
||||
|
||||
import asyncio
|
||||
import base64
|
||||
import hashlib
|
||||
@@ -13,14 +6,6 @@ from typing import AsyncGenerator, Dict, Optional
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from .macaroon import AESCipher, load_macaroon
|
||||
|
||||
if imports_ok:
|
||||
import lnbits.wallets.lnd_grpc_files.lightning_pb2 as ln
|
||||
import lnbits.wallets.lnd_grpc_files.lightning_pb2_grpc as lnrpc
|
||||
import lnbits.wallets.lnd_grpc_files.router_pb2 as router
|
||||
import lnbits.wallets.lnd_grpc_files.router_pb2_grpc as routerrpc
|
||||
|
||||
from lnbits.settings import settings
|
||||
|
||||
from .base import (
|
||||
@@ -30,6 +15,20 @@ from .base import (
|
||||
StatusResponse,
|
||||
Wallet,
|
||||
)
|
||||
from .macaroon import AESCipher, load_macaroon
|
||||
|
||||
imports_ok = True
|
||||
try:
|
||||
import grpc
|
||||
from grpc import RpcError
|
||||
except ImportError: # pragma: nocover
|
||||
imports_ok = False
|
||||
|
||||
if imports_ok:
|
||||
import lnbits.wallets.lnd_grpc_files.lightning_pb2 as ln
|
||||
import lnbits.wallets.lnd_grpc_files.lightning_pb2_grpc as lnrpc
|
||||
import lnbits.wallets.lnd_grpc_files.router_pb2 as router
|
||||
import lnbits.wallets.lnd_grpc_files.router_pb2_grpc as routerrpc
|
||||
|
||||
|
||||
def get_ssl_context(cert_path: str):
|
||||
|
||||
Reference in New Issue
Block a user