diff --git a/pyproject.toml b/pyproject.toml index cdf8a0e..5b27d52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,17 @@ max-complexity = 10 # --- Types ------------------------------------------------------------------ [tool.mypy] -python_version = "3.10" +# Deliberately NOT the minimum supported version. python_version is the syntax +# level mypy parses *everything* with, dependency stubs included, and numpy's +# stubs use PEP 695 `type` statements that only parse as 3.12+ -- with 3.10 here +# mypy fails inside numpy before it reaches our code. Pinning it rather than +# letting it follow the interpreter keeps mypy working on a 3.10 or 3.11 machine +# too. +# +# The 3.10 floor is still enforced, just not here: ruff takes its target version +# from requires-python and rejects newer syntax outright, and the test matrix +# runs on 3.10. +python_version = "3.12" files = ["src/garg_aml"] disallow_untyped_defs = true warn_redundant_casts = true