-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml.jinja
More file actions
84 lines (78 loc) · 2.07 KB
/
.pre-commit-config.yaml.jinja
File metadata and controls
84 lines (78 loc) · 2.07 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
default_install_hook_types:
- pre-commit
- post-checkout
- post-merge
- post-rewrite
{%- if with_conventional_commits %}
- pre-push
- commit-msg
{%- endif %}
default_stages:
- pre-commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
exclude: ^mkdocs\.yml$
- id: check-json
- id: check-added-large-files
{%- if with_conventional_commits %}
stages: [pre-commit]
{%- endif %}
- id: detect-private-key
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- id: end-of-file-fixer
{%- if with_conventional_commits %}
stages: [pre-commit]
{%- endif %}
- id: trailing-whitespace
{%- if with_conventional_commits %}
stages: [pre-commit]
{%- endif %}
{% if with_conventional_commits -%}
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.15.0
hooks:
- id: commitizen
{%- if cz_gitmoji %}
{%- if repository_provider == 'github' %}
# needed by Renovate to support additional dependencies
# see https://docs.renovatebot.com/modules/manager/pre-commit/
language: python
{%- endif %}
additional_dependencies:
- cz-conventional-gitmoji
{%- endif %}
stages:
- commit-msg
{%- endif %}
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.8
hooks:
- id: uv-sync
args: ["--locked"]
stages:
- post-checkout
- post-merge
- post-rewrite
{%- if with_conventional_commits %}
- pre-push
{%- endif %}
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy
language: system
pass_filenames: false