# Pre-commit hooks mirror `make lint` so local commits enforce the same checks as CI. # Installed via `make install-dev` (runs `pre-commit install`). # # Hooks use `language: system`, i.e. they invoke ruff/black/mypy from PATH rather than # letting pre-commit manage isolated tool environments. This keeps versions identical to # `make lint`/`make format` and lets mypy resolve the project's real dependencies. # Requirement: commit with the dev virtualenv active (so requirements-dev.txt tools are on # PATH). Outside an active venv the hooks will report the tools as "not found". repos: - repo: local hooks: - id: ruff-check name: ruff check entry: ruff check language: system types: [python] args: [src/, tests/] pass_filenames: false - id: ruff-format name: ruff format --check entry: ruff format --check language: system types: [python] args: [src/, tests/] pass_filenames: false - id: black name: black --check entry: black --check language: system types: [python] args: [src/, tests/] pass_filenames: false - id: mypy name: mypy entry: mypy language: system types: [python] args: [src/] pass_filenames: false