From 0061739c0340a0517bd0508542ef5db013180787 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Thu, 23 Apr 2026 04:38:34 -0500 Subject: [PATCH] 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 --- .pre-commit-config.yaml | 21 ++++++++++++++------- CLAUDE.md | 7 +++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ef52eacc..6f0861c36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,15 @@ repos: -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.8 - hooks: - # Run the linter. - - id: ruff-check - # Run the formatter. - - id: ruff-format \ No newline at end of file + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.8 + hooks: + - id: ruff-check + - 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 diff --git a/CLAUDE.md b/CLAUDE.md index b2b2549ca..253a1d6d5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,6 +12,13 @@ Discovery -> Ranking -> Context Extraction -> Test Gen + Optimization -> Baselin 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 Follow these steps in order, do not skip ahead: