From 4b660e96a720858069a9a82fecbae8df3da3623f Mon Sep 17 00:00:00 2001 From: ZigaMr Date: Tue, 10 May 2022 01:21:08 +0200 Subject: [PATCH] Used isort --- mev_inspect/geth_poa_middleware.py | 29 +++++------------------------ mev_inspect/inspect_block.py | 2 -- mev_inspect/provider.py | 2 +- mev_inspect/utils.py | 1 + 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/mev_inspect/geth_poa_middleware.py b/mev_inspect/geth_poa_middleware.py index 6eb103d..634e1c1 100644 --- a/mev_inspect/geth_poa_middleware.py +++ b/mev_inspect/geth_poa_middleware.py @@ -2,14 +2,7 @@ Modified asynchronous geth_poa_middleware which mirrors functionality of https://github.com/ethereum/web3.py/blob/master/web3/middleware/geth_poa.py """ -from typing import ( - Any, - Callable, -) - -from hexbytes import ( - HexBytes, -) +from typing import Any, Callable from eth_utils.curried import ( apply_formatter_if, @@ -17,23 +10,11 @@ from eth_utils.curried import ( apply_key_map, is_null, ) -from eth_utils.toolz import ( - complement, - compose, - assoc, -) - -from web3._utils.rpc_abi import ( - RPC, -) - -from web3.types import ( - Formatters, - RPCEndpoint, - RPCResponse, -) - +from eth_utils.toolz import assoc, complement, compose +from hexbytes import HexBytes from web3 import Web3 # noqa: F401 +from web3._utils.rpc_abi import RPC +from web3.types import Formatters, RPCEndpoint, RPCResponse async def get_geth_poa_middleware( diff --git a/mev_inspect/inspect_block.py b/mev_inspect/inspect_block.py index 01fb172..d1427b7 100644 --- a/mev_inspect/inspect_block.py +++ b/mev_inspect/inspect_block.py @@ -53,10 +53,8 @@ from mev_inspect.schemas.traces import ClassifiedTrace from mev_inspect.schemas.transfers import Transfer from mev_inspect.swaps import get_swaps from mev_inspect.transfers import get_transfers -from mev_inspect.liquidations import get_liquidations from mev_inspect.utils import RPCType - logger = logging.getLogger(__name__) diff --git a/mev_inspect/provider.py b/mev_inspect/provider.py index 890e9bb..59a0c65 100644 --- a/mev_inspect/provider.py +++ b/mev_inspect/provider.py @@ -1,7 +1,7 @@ from web3 import AsyncHTTPProvider, Web3 -from mev_inspect.retry import http_retry_with_backoff_request_middleware from mev_inspect.geth_poa_middleware import geth_poa_middleware +from mev_inspect.retry import http_retry_with_backoff_request_middleware from mev_inspect.utils import RPCType diff --git a/mev_inspect/utils.py b/mev_inspect/utils.py index 297ecf5..a47907e 100644 --- a/mev_inspect/utils.py +++ b/mev_inspect/utils.py @@ -1,4 +1,5 @@ from enum import Enum + from hexbytes._utils import hexstr_to_bytes