Skip to content

Commit 78741df

Browse files
committed
Optimize Pre-commit
1 parent c3717c9 commit 78741df

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ repos:
4343

4444
- id: mypy
4545
name: mypy
46-
entry: make mypy
46+
entry: make dmypy
4747
language: system
48+
types: [python]
4849
pass_filenames: false

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: lint format mypy shellcheck markdownlint dockerlint tomlfmt prettier static _test-lightweight _test-medium _test-comprehensive test-lightweight test-medium test-comprehensive clean-cache clean-dev
1+
.PHONY: lint format mypy dmypy shellcheck markdownlint dockerlint tomlfmt prettier static _test-lightweight _test-medium _test-comprehensive test-lightweight test-medium test-comprehensive clean-cache clean-dev
22

33
lint:
44
ruff check .
@@ -13,6 +13,9 @@ format:
1313
mypy:
1414
uv run --frozen mypy
1515

16+
dmypy:
17+
uv run --frozen dmypy run -- src
18+
1619
shellcheck:
1720
find . -name "*.sh" -not -path "./legacy/*" -not -path "./.venv/*" | xargs shellcheck
1821

@@ -53,6 +56,7 @@ clean-cache:
5356
find . -type d -name ".ruff_cache" -exec rm -rf {} +
5457
find . -type d -name ".mypy_cache" -exec rm -rf {} +
5558
find . -type d -name ".pytest_cache" -exec rm -rf {} +
59+
-uv run --frozen dmypy stop 2>/dev/null; rm -f .dmypy.json
5660

5761
clean-dev: clean-cache
5862
find . -type d -name "*.egg-info" -exec rm -rf {} +

0 commit comments

Comments
 (0)