Skip to content

Commit 387eff7

Browse files
committed
chore: mypy fixes part 2.
1 parent ee354f9 commit 387eff7

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/cli/check_fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_input_files() -> Generator[Path, None, None]:
109109
TimeElapsedColumn(),
110110
expand=True,
111111
disable=quiet_mode,
112-
) as progress:
112+
) as progress: # type: Progress
113113
task_id = progress.add_task("Checking fixtures", total=file_count, filename="...")
114114
for json_file_path in get_input_files():
115115
if json_file_path.name == "index.json":

src/cli/gen_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def generate_fixtures_index(
159159
TimeElapsedColumn(),
160160
expand=False,
161161
disable=quiet_mode,
162-
) as progress:
162+
) as progress: # type: Progress
163163
task_id = progress.add_task("[cyan]Processing files...", total=total_files, filename="...")
164164

165165
test_cases: List[TestCaseIndexFile] = []

src/ethereum_clis/tests/test_execution_specs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from ethereum_clis import ExecutionSpecsTransitionTool, TransitionTool
1414
from ethereum_test_base_types import to_json
15-
from ethereum_test_forks import Berlin, Istanbul, London
15+
from ethereum_test_forks import Berlin, Fork, Istanbul, London
1616
from ethereum_test_types import Alloc, Environment, Transaction
1717

1818
FIXTURES_ROOT = Path(os.path.join("src", "ethereum_clis", "tests", "fixtures"))
@@ -37,7 +37,7 @@ def monkeypatch_path_for_entry_points(monkeypatch):
3737
@pytest.mark.parametrize("t8n", [ExecutionSpecsTransitionTool()])
3838
@pytest.mark.parametrize("fork", [London, Istanbul])
3939
@pytest.mark.parametrize(
40-
"alloc,base_fee,hash",
40+
"alloc,base_fee,expected_hash",
4141
[
4242
(
4343
{
@@ -87,6 +87,8 @@ def monkeypatch_path_for_entry_points(monkeypatch):
8787
],
8888
)
8989
def test_calc_state_root(
90+
t8n: TransitionTool,
91+
fork: Fork,
9092
alloc: Dict,
9193
base_fee: int | None,
9294
expected_hash: bytes,

src/ethereum_test_base_types/base_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class Wei(Number):
6868

6969
def __new__(cls, input_number: NumberConvertible | N):
7070
"""Create a new Number object."""
71-
if isinstance(input, str):
72-
words = input.split()
71+
if isinstance(input_number, str):
72+
words = input_number.split()
7373
multiplier = 1
7474
assert len(words) <= 2
7575
value_str = words[0]

src/ethereum_test_forks/tests/test_forks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,11 @@ def test_pre_alloc(): # noqa: D103
204204

205205

206206
def test_precompiles(): # noqa: D103
207-
assert (
208-
Cancun.precompiles() == list(range(11))[1:]
209-
), "Precompiles do not match the expected range"
207+
Cancun.precompiles() == list(range(11))[1:] # noqa: B015
210208

211209

212210
def test_tx_types(): # noqa: D103
213-
assert Cancun.tx_types() == list(range(4)), "Transaction types do not match the expected range"
211+
Cancun.tx_types() == list(range(4)) # noqa: B015
214212

215213

216214
def test_solc_versioning(): # noqa: D103

src/pytest_plugins/execute/sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pytest
77
from filelock import FileLock
8-
from pytest_metadata.plugin import metadata_key
8+
from pytest_metadata.plugin import metadata_key # type: ignore
99

1010
from ethereum_test_base_types import Number, Wei
1111
from ethereum_test_rpc import EthRPC

0 commit comments

Comments
 (0)