From 3b85a75fe600a87c52d97a7741cceecd3bc4fbc9 Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Tue, 25 Feb 2025 13:15:11 +0000 Subject: [PATCH] linting --- counterparty-core/counterpartycore/lib/api/apiserver.py | 2 +- counterparty-core/counterpartycore/lib/api/queries.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/counterparty-core/counterpartycore/lib/api/apiserver.py b/counterparty-core/counterpartycore/lib/api/apiserver.py index 31c3356962..c5a4308aa3 100644 --- a/counterparty-core/counterpartycore/lib/api/apiserver.py +++ b/counterparty-core/counterpartycore/lib/api/apiserver.py @@ -495,7 +495,7 @@ def run_apiserver( ): logger.info("Starting API Server process...") - def handle_interrupt_signal(signum, frame): + def handle_interrupt_signal(_signum, _frame): pass wsgi_server = None diff --git a/counterparty-core/counterpartycore/lib/api/queries.py b/counterparty-core/counterpartycore/lib/api/queries.py index ed9c7668e8..b37767de18 100644 --- a/counterparty-core/counterpartycore/lib/api/queries.py +++ b/counterparty-core/counterpartycore/lib/api/queries.py @@ -333,7 +333,7 @@ def select_rows( if table == "all_transactions": for row in result: - row["confirmed"] = True if row["confirmed"] == 1 else False + row["confirmed"] = bool(row["confirmed"]) return QueryResult(result, next_cursor, table, result_count) @@ -441,7 +441,7 @@ def get_transactions( def get_transactions_by_block( ledger_db, block_index: int, - type: TransactionType = "all", + type: TransactionType = "all", # pylint: disable=W0622 show_unconfirmed: bool = False, cursor: str = None, limit: int = 10, @@ -472,7 +472,7 @@ def get_transactions_by_block( def get_transactions_by_address( ledger_db, address: str, - type: TransactionType = "all", + type: TransactionType = "all", # pylint: disable=W0622 show_unconfirmed: bool = False, cursor: str = None, limit: int = 10, @@ -503,7 +503,7 @@ def get_transactions_by_address( def get_transactions_by_addresses( ledger_db, addresses: str, - type: TransactionType = "all", + type: TransactionType = "all", # pylint: disable=W0622 show_unconfirmed: bool = False, cursor: str = None, limit: int = 100,