Skip to content

Commit 8601fea

Browse files
tmbnvclaude
andcommitted
Add mypy type checking to Makefile
- Add mypy and typecheck targets to run type checking - Include typecheck in the push target to verify types before pushing - Ensure all source files are type-checked during CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1b04981 commit 8601fea

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: venv shell test docs serve lint push pypi clean testpypi rerelease patchrelease minorrelease majorrelease
1+
.PHONY: venv shell test docs serve lint mypy typecheck push pypi clean testpypi rerelease patchrelease minorrelease majorrelease
22

33
# Lint code using Black and Ruff
44
lint:
@@ -53,6 +53,7 @@ serve:
5353
push:
5454
test -z "$$(git status --porcelain)"
5555
$(MAKE) lint
56+
$(MAKE) typecheck
5657
$(MAKE) test
5758
git push
5859

@@ -91,6 +92,13 @@ majorrelease:
9192
coverage:
9293
uv run pytest --cov=webdataset --cov=wids --cov-report=term-missing
9394

95+
# Type checking with mypy
96+
mypy:
97+
uv run mypy --ignore-missing-imports src/wids
98+
99+
# Alias for mypy (common convention)
100+
typecheck: mypy
101+
94102
# unused:
95103
# ./find-unused wids webdataset tests | grep -v test_ | grep -v tests/ | grep -v "function '_" | sort
96104

0 commit comments

Comments
 (0)