diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a01633..f92b1c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: debug-statements - id: mixed-line-ending - repo: https://github.com/psf/black - rev: 21.9b0 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/pycqa/isort diff --git a/app/external/sse_starlette/sse_starlette.py b/app/external/sse_starlette/sse_starlette.py index 49a6b2d..be53e27 100644 --- a/app/external/sse_starlette/sse_starlette.py +++ b/app/external/sse_starlette/sse_starlette.py @@ -45,7 +45,6 @@ try: """ Server.handle_exit = original_handler - except ModuleNotFoundError as e: _log = logging.getLogger(__name__) # logging.basicConfig(level=logging.INFO) diff --git a/app/repositories/apps.py b/app/repositories/apps.py index 26b59c8..4d8f76d 100644 --- a/app/repositories/apps.py +++ b/app/repositories/apps.py @@ -16,6 +16,7 @@ SHELL_SCRIPT_PATH = config("shell_script_path") node_type = config("ln_node") + async def get_app_status_single(app_iD): if app_iD not in available_app_ids: @@ -108,13 +109,17 @@ async def get_app_status(): for appID in available_app_ids: # skip app based on node running - if node_type=="" or node_type=="none": - if appID=="rtl": continue - if appID=="lnbits": continue - if appID=="thunderhub": continue - elif node_type=="cln_grpc": - if appID=="thunderhub": continue - #elif node_type="lnd_grpc": + if node_type == "" or node_type == "none": + if appID == "rtl": + continue + if appID == "lnbits": + continue + if appID == "thunderhub": + continue + elif node_type == "cln_grpc": + if appID == "thunderhub": + continue + # elif node_type="lnd_grpc": # get status (installed, etc) and append appStatusList.append(await get_app_status_single(appID)) diff --git a/app/repositories/system_impl/raspiblitz.py b/app/repositories/system_impl/raspiblitz.py index 6e3bb74..81830f9 100644 --- a/app/repositories/system_impl/raspiblitz.py +++ b/app/repositories/system_impl/raspiblitz.py @@ -21,7 +21,7 @@ SHELL_SCRIPT_PATH = config("shell_script_path") async def get_system_info_impl() -> SystemInfo: lightning = await redis_get("lightning") - if lightning=="" or lightning=="none": + if lightning == "" or lightning == "none": data_chain = await redis_get("chain") data_chain = f"{data_chain}net" data_alias = await redis_get("hostname") diff --git a/app/repositories/utils.py b/app/repositories/utils.py index c0d1bf4..afdf03a 100644 --- a/app/repositories/utils.py +++ b/app/repositories/utils.py @@ -40,6 +40,7 @@ async def get_full_client_warmup_data() -> List: ) return [*res] + async def get_full_client_warmup_data_bitcoinonly() -> List: """Get the full data set needed without Lightning available"""