-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
29 lines (26 loc) · 1.01 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
29 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
repos:
# Ruff - linter AND formatter (the single source of truth; CI gates `ruff check` + `ruff format`)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.21
hooks:
# Lint with autofix, then format, both read the configuration from pyproject.toml
- id: ruff
args: ['--fix', '--exit-non-zero-on-fix']
- id: ruff-format
# Local guards
- repo: local
hooks:
# Block uv.lock's self-version from drifting behind pyproject (release-please
# bumps pyproject but not the lockfile).
- id: lock-version
name: uv.lock self-version matches pyproject
entry: python3 scripts/check_lock_version.py --check
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false
# Xenon - Code complexity checker (temporarily disabled)
# - repo: https://github.com/rubik/xenon
# rev: v0.9.1
# hooks:
# - id: xenon
# args: ['--max-absolute', 'B', '--max-modules', 'B', '--max-average', 'A']