From 28c144384420b8c2f81783880c39bb7b9cc8a256 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Tue, 20 Feb 2024 16:04:44 -0500 Subject: [PATCH] Fix linter errors. --- atxm/machine.py | 8 ++------ atxm/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/atxm/machine.py b/atxm/machine.py index 36700f2..832760c 100644 --- a/atxm/machine.py +++ b/atxm/machine.py @@ -222,9 +222,7 @@ def __handle_active_transaction(self) -> bool: # Outcome 1: the pending transaction is paused by strategies if self.__pause: - self.log.warn( - f"[pause] transaction #{pending_tx.id} paused by strategies" - ) + self.log.warn(f"[pause] transaction #{pending_tx.id} paused by strategies") return False try: @@ -378,9 +376,7 @@ def __get_receipt(self, pending_tx: PendingTx) -> Optional[TxReceipt]: txdata = self.w3.eth.get_transaction(pending_tx.txhash) pending_tx.data = txdata except TransactionNotFound: - self.log.error( - f"[error] Transaction {pending_tx.txhash.hex()} not found" - ) + self.log.error(f"[error] Transaction {pending_tx.txhash.hex()} not found") return receipt = _get_receipt(w3=self.w3, txhash=txdata['hash']) diff --git a/atxm/utils.py b/atxm/utils.py index d1c6f63..f6ad071 100644 --- a/atxm/utils.py +++ b/atxm/utils.py @@ -1,11 +1,11 @@ import contextlib -from typing import Callable, Optional, Union +from typing import Callable, Optional from cytoolz import memoize from twisted.internet import reactor from web3 import Web3 from web3.exceptions import TransactionNotFound -from web3.types import PendingTx as PendingTxData, TxData, TxParams +from web3.types import TxData, TxParams from web3.types import RPCError, TxReceipt, Wei from atxm.exceptions import (