The local hooks are the source for the GitHub Actions quality commands.
uv run pre-commit run --hook-stage pre-commit --all-filesThis runs Ruff, strict Pyright, and deptry.
uv run pre-commit run --hook-stage pre-push --all-filesThis runs tests with branch coverage, changed-line coverage, package inspection, and a strict documentation build.
uv run pre-commit run dependency-audit --hook-stage manual --all-filesGitHub Actions runs the same audit weekly. Add project-specific checks as separate hooks, then invoke those hooks from CI so local and remote behavior remain aligned.
Strict Pyright runs as a blocking pre-commit hook. To use basedpyright instead — a stricter, pure-Python fork that installs through uv without a separate Node runtime — make three changes:
- replace
pyrightwithbasedpyrightin thedevgroup ofpyproject.toml; - change the
pyrighthookentryin.pre-commit-config.yamltouv run --frozen basedpyright; - configure it under
[tool.basedpyright](it reads the existing[tool.pyright]keys).
Pyright is the default because Microsoft maintains it; basedpyright adds strictness and richer reporting at the cost of a single-maintainer fork.
The frozen pre-commit and pre-push stages run on a single pinned interpreter for
a fast local loop. CI additionally runs the test suite across the supported
range: the minimum Python with the oldest direct dependencies
(--resolution lowest-direct) and the maximum Python with the newest
(--resolution highest). This catches both under-specified lower bounds and
breakage on new interpreters.