chore: add mypy to pre-commit config and document setup

- Add mypy as a local pre-commit hook via prek (ruff-check + ruff-format
  + mypy now all run at commit time)
- Add Setup section to CLAUDE.md with uv sync and prek install steps
This commit is contained in:
Kevin Turcios 2026-04-23 04:38:34 -05:00
parent e4b1fb854b
commit 0061739c03
2 changed files with 21 additions and 7 deletions

View file

@ -1,8 +1,15 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8 rev: v0.15.8
hooks: hooks:
# Run the linter. - id: ruff-check
- id: ruff-check - id: ruff-format
# Run the formatter.
- id: ruff-format - repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy --non-interactive --config-file pyproject.toml
language: system
types: [python]
require_serial: true

View file

@ -12,6 +12,13 @@ Discovery -> Ranking -> Context Extraction -> Test Gen + Optimization -> Baselin
See `.claude/rules/architecture.md` for directory mapping and entry points. See `.claude/rules/architecture.md` for directory mapping and entry points.
## Setup
```bash
uv sync # Install all dependencies
uv run prek install # Install git pre-commit hooks (ruff + mypy)
```
## Bug Fix Workflow ## Bug Fix Workflow
Follow these steps in order, do not skip ahead: Follow these steps in order, do not skip ahead: