diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index e5e2bba..cfc0bb1 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -17,6 +17,9 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + - name: Type check (mypy) + run: | + make typecheck - name: Run test suite run: | make test diff --git a/Makefile b/Makefile index c3d6fa2..90bbb8a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -.PHONY: test +.PHONY: test typecheck test: python3 -m pytest tests/test_ci_config.py scripts/test_*.py -v + +typecheck: + mypy scripts/ tests/ --config-file=mypy.ini --show-error-codes diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..10bc74d --- /dev/null +++ b/mypy.ini @@ -0,0 +1,20 @@ +[mypy] +# Compounding Intelligence Type Checker Configuration (Issue #157) +python_version = 3.11 +ignore_missing_imports = True +warn_unused_ignores = True +warn_redundant_casts = True +warn_return_any = True +show_error_codes = True +pretty = True + +# Per-module strictness +[mypy-tests.*] +disallow_untyped_defs = False + +[mypy-scripts.test_*] +disallow_untyped_defs = False + +# Optional: uncomment to enforce stricter checking gradually +# disallow_untyped_defs = True +# check_untyped_defs = True diff --git a/requirements.txt b/requirements.txt index 75b4ea8..b34fd64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ pytest>=8,<9 +mypy>=1.0