Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ ignore = [
"D205", # Missing blank line after summary
"D212", # Multi-line docstring summary should start at the first line
"D401", # First line should be in imperative mood ("Do", not "Does")
# TODO: ethereum/execution-spec-tests#2176
"ARG002", # unused-method-argument
"ARG003", # unused-class-method-argument
"ARG005", # unused-lambda-argument
]

[tool.ruff.lint.per-file-ignores]
Expand Down
2 changes: 2 additions & 0 deletions src/ethereum_clis/clis/besu.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def evaluate(
slow_request: bool = False,
) -> TransitionToolOutput:
"""Execute `evm t8n` with the specified arguments."""
del slow_request

if not self.process:
self.start_server()

Expand Down
1 change: 1 addition & 0 deletions src/ethereum_clis/clis/ethereumjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def is_fork_supported(self, fork: Fork) -> bool:

Currently, EthereumJS-t8n provides no way to determine supported forks.
"""
del fork
return True


Expand Down
2 changes: 2 additions & 0 deletions src/ethereum_clis/clis/evmone.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def is_fork_supported(self, fork: Fork) -> bool:
Return True if the fork is supported by the tool. Currently, evmone-t8n
provides no way to determine supported forks.
"""
del fork
return True


Expand All @@ -71,6 +72,7 @@ def __init__(
trace: bool = False,
):
"""Initialize the EvmoneFixtureConsumerCommon class."""
del trace
self._info_metadata: Optional[Dict[str, Any]] = {}

def _run_command(self, command: List[str]) -> subprocess.CompletedProcess:
Expand Down
4 changes: 4 additions & 0 deletions src/ethereum_clis/clis/nethermind.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def consume_state_test_file(
function is cached in order to only call the command once and
`consume_state_test` can simply select the result that was requested.
"""
del fixture_path
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

if debug_output_path:
Expand Down Expand Up @@ -228,6 +229,8 @@ def consume_blockchain_test(
debug_output_path: Optional[Path] = None,
) -> None:
"""Execute the the fixture at `fixture_path` via `nethtest`."""
del fixture_path
del fixture_name
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

if debug_output_path:
Expand All @@ -249,6 +252,7 @@ def consume_eof_test_file(
debug_output_path: Optional[Path] = None,
) -> Tuple[Dict[Any, Any], str, str]:
"""Consume an entire EOF fixture file."""
del fixture_path
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

pattern = re.compile(r"^(test_.+?)\s+(PASS|FAIL)$", re.MULTILINE)
Expand Down
1 change: 1 addition & 0 deletions src/ethereum_clis/transition_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def _server_post(

def _generate_post_args(self, t8n_data: TransitionToolData) -> Dict[str, List[str] | str]:
"""Generate the arguments for the POST request to the t8n-server."""
del t8n_data
return {}

def _evaluate_server(
Expand Down
1 change: 1 addition & 0 deletions src/ethereum_test_base_types/tests/test_base_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def test_json_serialization(
self, can_be_deserialized: bool, model_instance: Any, json: str | Dict[str, Any]
) -> None:
"""Test that to_json returns the expected JSON for the given object."""
del can_be_deserialized
assert to_json(model_instance) == json

def test_json_deserialization(
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum_test_benchmark/benchmark_code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def deploy_contracts(self, pre: Alloc, fork: Fork) -> None:
code = self.generate_repeated_code(self.attack_block, self.setup, fork)
self._contract_address = pre.deploy_contract(code=code)

def generate_transaction(self, pre: Alloc, gas_limit: int, fork: Fork) -> Transaction:
def generate_transaction(self, pre: Alloc, gas_limit: int) -> Transaction:
"""Generate transaction that executes the looping contract."""
if not hasattr(self, "_contract_address"):
raise ValueError("deploy_contracts must be called before generate_transaction")
Expand Down Expand Up @@ -68,7 +68,7 @@ def deploy_contracts(self, pre: Alloc, fork: Fork) -> None:
caller_code = self.generate_repeated_code(code_sequence, Bytecode(), fork)
self._contract_address = pre.deploy_contract(code=caller_code)

def generate_transaction(self, pre: Alloc, gas_limit: int, fork: Fork) -> Transaction:
def generate_transaction(self, pre: Alloc, gas_limit: int) -> Transaction:
"""Generate transaction that executes the caller contract."""
if not hasattr(self, "_contract_address"):
raise ValueError("deploy_contracts must be called before generate_transaction")
Expand Down
2 changes: 2 additions & 0 deletions src/ethereum_test_execution/transaction_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def execute(
request: FixtureRequest,
) -> None:
"""Execute the format."""
del fork
del engine_rpc
assert not any(tx.ty == 3 for block in self.blocks for tx in block), (
"Transaction type 3 is not supported in execute mode."
)
Expand Down
2 changes: 2 additions & 0 deletions src/ethereum_test_fixtures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def supports_fork(cls, fork: Fork) -> bool:

By default, all fixtures support all forks.
"""
del fork
return True

@classmethod
Expand All @@ -168,6 +169,7 @@ def discard_fixture_format_by_marks(
Discard a fixture format from filling if the appropriate marker is
used.
"""
del fork, markers
return False


Expand Down
1 change: 1 addition & 0 deletions src/ethereum_test_fixtures/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,5 +679,6 @@ def discard_fixture_format_by_marks(
markers: List[pytest.Mark],
) -> bool:
"""Discard the fixture format based on the provided markers."""
del fork
marker_names = [m.name for m in markers]
return "verify_sync" not in marker_names
2 changes: 2 additions & 0 deletions src/ethereum_test_fixtures/tests/test_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ def test_json_serialization(
self, can_be_deserialized: bool, model_instance: Any, json_repr: str | Dict[str, Any]
) -> None:
"""Test that to_json returns the expected JSON for the given object."""
del can_be_deserialized
assert to_json(model_instance) == json_repr

def test_json_deserialization(
Expand Down Expand Up @@ -1308,6 +1309,7 @@ def test_json_serialization(
json_repr: str | Dict[str, Any],
) -> None:
"""Test that to_json returns the expected JSON for the given object."""
del can_be_deserialized
assert (
adapter.dump_python(
type_instance,
Expand Down
1 change: 1 addition & 0 deletions src/ethereum_test_fixtures/tests/test_eof.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def test_json_serialization(
self, can_be_deserialized: bool, model_instance: Any, json_repr: str | Dict[str, Any]
) -> None:
"""Test that to_json returns the expected JSON for the given object."""
del can_be_deserialized
serialized = to_json(model_instance)
serialized.pop("_info")
assert serialized == json_repr
Expand Down
1 change: 1 addition & 0 deletions src/ethereum_test_fixtures/tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def test_json_serialization(
self, can_be_deserialized: bool, model_instance: Any, json: str | Dict[str, Any]
) -> None:
"""Test that to_json returns the expected JSON for the given object."""
del can_be_deserialized
assert to_json(model_instance) == json

def test_json_deserialization(
Expand Down
1 change: 1 addition & 0 deletions src/ethereum_test_forks/base_fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ def fork_at(cls, *, block_number: int = 0, timestamp: int = 0) -> Type["BaseFork
Return fork at the given block number and timestamp. Useful only for
transition forks, and it's a no-op for normal forks.
"""
del block_number, timestamp
return cls

@classmethod
Expand Down
Loading
Loading