@@ -93,7 +93,7 @@ help-verbose:
9393 @echo " - mdformat: Formats markdown files"
9494 @echo " - codespell: Checks for spelling mistakes"
9595 @echo " - ruff: Python linter and formatter"
96- @echo " - mypy : Static type checker for Python"
96+ @echo " - ty : Static type checker for Python"
9797 @echo " - Fork comments validation (scripts/check_fork_comments.py)"
9898 @echo " - Markdown headings validation (scripts/check_markdown_headings.py)"
9999 @echo " - Markdown note style fix (scripts/fix_note_style.py)"
@@ -257,8 +257,6 @@ serve_docs: _pyspec _copy_docs
257257LINT_DIFF_BEFORE := .lint_diff_before
258258LINT_DIFF_AFTER := .lint_diff_after
259259MARKDOWN_FILES := $(shell find $(CURDIR ) -name '* .md' -not -path '$(CURDIR ) /.git/* ' -not -path '$(CURDIR ) /.venv/* ')
260- MYPY_PACKAGE_BASE := $(subst /,.,$(PYSPEC_DIR:$(CURDIR ) /%=% ) )
261- MYPY_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES ) , -p $(MYPY_PACKAGE_BASE ) .eth_consensus_specs.$S)
262260
263261# Check for mistakes.
264262lint : _pyspec
@@ -275,8 +273,9 @@ lint: _pyspec
275273 @$(UV_RUN ) ruff check --fix --quiet $(CURDIR ) /tests $(CURDIR ) /pysetup $(CURDIR ) /specs
276274 @$(UV_RUN ) ruff format --quiet $(CURDIR ) /tests $(CURDIR ) /pysetup
277275 @$(UV_RUN ) ruff format --preview --quiet $(CURDIR ) /specs
278- @output=" $$ ($( UV_RUN) mypy $( MYPY_SCOPE) 2>&1)" || \
279- { echo " $$ output" ; exit 1; }
276+ @$(UV_RUN ) ty check --no-progress \
277+ $(PYSPEC_DIR ) /eth_consensus_specs/* /mainnet.py \
278+ $(PYSPEC_DIR ) /eth_consensus_specs/* /minimal.py
280279 @git diff > $(LINT_DIFF_AFTER )
281280 @diff -q $(LINT_DIFF_BEFORE ) $(LINT_DIFF_AFTER ) > /dev/null 2>&1 || \
282281 echo " $( BOLD) Note: make lint modified tracked files$( NORM) "
0 commit comments