-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (60 loc) · 2.01 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
61 lines (60 loc) · 2.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-json
exclude: ^\.vscode/ # VS Code config files are JSONC (allow comments)
- id: check-toml
- id: check-yaml
exclude: ^mkdocs\.yml$ # uses !!python/name: custom tags the safe loader rejects
- id: check-merge-conflict
- id: check-added-large-files
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
# Local `uv run` hooks so tool versions come from pyproject.toml/uv.lock (single source of truth).
- repo: local
hooks:
# --force-exclude so ruff honors `exclude` (e.g. migrations); pre-commit passes
# explicit filenames, which otherwise bypass it. The upstream ruff hook adds this too.
- id: ruff
name: ruff check
entry: uv run ruff check --force-exclude --fix --show-fixes
language: system
types: [python]
- id: ruff-format
name: ruff format
entry: uv run ruff format --force-exclude
language: system
types: [python]
- id: djlint-format
name: djlint format
entry: uv run djlint --reformat
language: system
types_or: [html, jinja]
- id: djlint-lint
name: djlint lint
entry: uv run djlint --lint
language: system
types_or: [html, jinja]
- id: pyright
name: pyright
entry: uv run pyright
language: system
types: [python]
pass_filenames: false
- id: uv-lock
name: uv lock check
entry: uv lock --check
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false
- id: uv-lock-radis-client
name: uv lock check (radis-client)
entry: uv lock --check --project radis-client
language: system
files: ^radis-client/(pyproject\.toml|uv\.lock)$
pass_filenames: false