-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
37 lines (37 loc) · 1.45 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
37 lines (37 loc) · 1.45 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
30
31
32
33
34
35
36
37
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-yaml
args: [--allow-multiple-documents]
exclude: ^helm/
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, main]
- id: trailing-whitespace
- id: check-added-large-files
# Ruff runs through `uv run`, not through ruff-pre-commit, so the hook and
# CI resolve the SAME ruff from uv.lock. A pinned `rev:` here is a second
# version of the linter that drifts from the one in pyproject.toml, and the
# drift is invisible until someone edits a file that the two versions
# disagree about: v0.9.4 still carried UP038, which the ruff this project
# resolves has removed, so `uv run ruff check` passed on a file the hook
# rejected. `--force-exclude` keeps pyproject's exclusions honoured when
# pre-commit passes filenames explicitly, matching what ruff-pre-commit did.
- repo: local
hooks:
- id: ruff
name: ruff
entry: uv run ruff check --fix --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
- id: ruff-format
name: ruff-format
entry: uv run ruff format --force-exclude
language: system
types_or: [python, pyi]
require_serial: true