Skip to content

Commit 5dc3a7e

Browse files
committed
fix naming issues raised by linting
1 parent dd1d6e0 commit 5dc3a7e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/ethereum_spec_tools/evm_tools/t8n/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from ..loaders.fixture_loader import Load
2020
from ..loaders.fork_loader import ForkLoad
2121
from ..utils import (
22-
FatalException,
22+
FatalError,
2323
get_module_name,
2424
get_stream_logger,
2525
parse_hex_or_int,
@@ -307,7 +307,7 @@ def run(self) -> int:
307307
self.run_state_test()
308308
else:
309309
self.run_blockchain_test()
310-
except FatalException as e:
310+
except FatalError as e:
311311
self.logger.error(str(e))
312312
return 1
313313

src/ethereum_spec_tools/evm_tools/t8n/evm_trace.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ class Trace:
4545
pc: int
4646
op: Optional[Union[str, int]]
4747
gas: str
48-
gasCost: str
48+
gas_cost: str
4949
memory: Optional[str]
50-
memSize: int
50+
mem_size: int
5151
stack: Optional[List[str]]
52-
returnData: Optional[str]
52+
return_data: Optional[str]
5353
depth: int
5454
refund: int
55-
opName: str
56-
gasCostTraced: bool = False
57-
errorTraced: bool = False
55+
op_name: str
56+
gas_cost_traced: bool = False
57+
error_traced: bool = False
5858
precompile: bool = False
5959
error: Optional[str] = None
6060

@@ -66,7 +66,7 @@ class FinalTrace:
6666
"""
6767

6868
output: str
69-
gasUsed: str
69+
gas_used: str
7070
error: Optional[str] = None
7171

7272
def __init__(

src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from ethereum.utils.hexadecimal import hex_to_bytes, hex_to_u256, hex_to_uint
1414

1515
from ..loaders.transaction_loader import TransactionLoad, UnsupportedTx
16-
from ..utils import FatalException, encode_to_hex, secp256k1_sign
16+
from ..utils import FatalError, encode_to_hex, secp256k1_sign
1717

1818
if TYPE_CHECKING:
1919
from . import T8N
@@ -237,7 +237,7 @@ def sign_transaction(self, json_tx: Any) -> None:
237237
signing_hash = t8n.fork.signing_hash_7702(tx_decoded)
238238
v_addend = U256(0)
239239
else:
240-
raise FatalException("Unknown transaction type")
240+
raise FatalError("Unknown transaction type")
241241

242242
r, s, y = secp256k1_sign(signing_hash, int(secret_key))
243243
json_tx["r"] = hex(r)

src/ethereum_spec_tools/evm_tools/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def parse_hex_or_int(value: str, to_type: Callable[[int], W]) -> W:
7575
return to_type(int(value))
7676

7777

78-
class FatalException(Exception):
78+
class FatalError(Exception):
7979
"""Exception that causes the tool to stop"""
8080

8181
pass

0 commit comments

Comments
 (0)