Skip to content

Commit a9fc9ee

Browse files
authored
fix(src,tests): Fix import typing errors (#2290)
* feat(stubs): Add `pytest_metadata` * fix(pyproject.toml): Re-enable untyped imports checks * fix(tests): Use relative imports in tests
1 parent d1d62bc commit a9fc9ee

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ ignore = [
170170
"tests/*" = ["ARG001"] # TODO: ethereum/execution-spec-tests#2188
171171

172172
[tool.mypy]
173-
disable_error_code = ["import-untyped"]
174173
mypy_path = ["src", "$MYPY_CONFIG_FILE_DIR/stubs"]
175174
files = ["src", "tests"]
176175
exclude = [

src/ethereum_clis/transition_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from requests import Response
1717
from requests.exceptions import ConnectionError as RequestsConnectionError
1818
from requests.exceptions import ReadTimeout
19-
from requests_unixsocket import Session
19+
from requests_unixsocket import Session # type: ignore
2020

2121
from ethereum_test_base_types import BlobSchedule
2222
from ethereum_test_exceptions import ExceptionMapper

stubs/pytest_metadata/__init__.pyi

Whitespace-only changes.

stubs/pytest_metadata/plugin.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from _pytest.stash import StashKey
2+
3+
metadata_key: StashKey

tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
BlockAccessListExpectation,
2121
)
2222
from ethereum_test_vm import Opcodes as Op
23-
from tests.prague.eip7702_set_code_tx.spec import Spec as Spec7702
2423

24+
from ...prague.eip7702_set_code_tx.spec import Spec as Spec7702
2525
from .spec import ref_spec_7928
2626

2727
REFERENCE_SPEC_GIT_PATH = ref_spec_7928.git_path

0 commit comments

Comments
 (0)