50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
# Local hooks run through `uv run` so they use the pinned tool versions
|
|
# from uv.lock (ruff/mypy in the `dev` group). Install with: uv run pre-commit install
|
|
|
|
minimum_pre_commit_version: "4.0.0"
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
# Compose override uses the !override extension tag (valid only for
|
|
# Docker Compose >= 2.24, unknown to plain YAML parsers).
|
|
exclude: ^deploy/vps/docker-compose\.override\.example\.yml$
|
|
- id: check-toml
|
|
- id: check-added-large-files
|
|
- id: check-merge-conflict
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: isort
|
|
name: isort
|
|
entry: uv run isort
|
|
language: system
|
|
types: [python]
|
|
require_serial: true
|
|
|
|
- id: ruff-check
|
|
name: ruff check (autofix)
|
|
entry: uv run ruff check --fix --exit-non-zero-on-fix
|
|
language: system
|
|
types: [python]
|
|
require_serial: true
|
|
|
|
- id: ruff-format
|
|
name: ruff format
|
|
entry: uv run ruff format
|
|
language: system
|
|
types: [python]
|
|
require_serial: true
|
|
|
|
- id: ty
|
|
name: ty (src)
|
|
entry: uv run ty check src
|
|
language: system
|
|
types: [python]
|
|
pass_filenames: false
|