generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
80 lines (80 loc) · 2.42 KB
/
.pre-commit-config.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
exclude: "^amt/static/vendor/.*|amt/locale/.*"
- id: trailing-whitespace
- id: check-yaml
exclude: "^(example|example_system_card|example_registry)/"
- id: check-json
exclude: 'tsconfig\.json'
- id: check-added-large-files
- id: check-merge-conflict
- id: check-toml
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [--config, pyproject.toml]
- id: ruff-format
args: [--config, pyproject.toml]
- repo: https://github.com/djlint/djLint
rev: v1.36.1
hooks:
- id: djlint-reformat-jinja
- repo: local
hooks:
- id: check-modified-migrations
name: check-modified-migrations
entry: sh -c '! git diff --cached --name-only --diff-filter=MD | grep ^amt/migrations/versions'
language: system
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: check-translate
name: check-translate
additional_dependencies: [polib]
entry: ./script/check_translate
language: python
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: check-translate-compiled
name: check-translate-compiled
entry: ./script/check_compiled_translations
language: system
files: \.po$
- repo: local
hooks:
- id: po-file-handler
name: PO file timestamp homogenizer
entry: ./script/po_file_handler
language: python
files: \.(po|pot)$
stages: [pre-commit]
additional_dependencies: ["babel==2.15.0"] # Specify the version you need
- repo: local
hooks:
- id: husky-run-pre-commit-lint
name: husky-lint
language: system
entry: .husky/pre-commit-lint
pass_filenames: false
always_run: true
- id: husky-run-pre-commit-prettier
name: husky-prettier
language: system
entry: .husky/pre-commit-prettier
pass_filenames: false
always_run: true
ci:
autofix_prs: false
autofix_commit_msg: "Auto fix pre-commit.com hooks"
autoupdate_commit_msg: "Update .pre-commit-config.yaml"
skip: [husky-run-pre-commit-lint, husky-run-pre-commit-prettier]