Skip to content

Development

Pre-commit hooks

This project uses pre-commit to run code quality checks before each commit. The hooks enforce:

  • ruff — Python linting and formatting
  • uv-lock — keeps uv.lock in sync with pyproject.toml
  • typos — catches common misspellings
  • conventional-pre-commit — enforces conventional commit messages

Setup

Install the hooks (one-time):

uvx pre-commit install
uvx pre-commit install --hook-type commit-msg

Usage

Hooks run automatically on git commit. To run them manually against all files:

uvx pre-commit run --all-files

If a hook modifies a file (e.g. ruff auto-formats), the commit is aborted. Stage the changes and commit again.