-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
136 lines (122 loc) · 3.36 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
# https://pre-commit.com
default_install_hook_types: [pre-commit, pre-push, commit-msg]
default_stages: [pre-commit, manual]
fail_fast: true
repos:
- repo: "https://github.com/commitizen-tools/commitizen"
rev: v4.4.1
hooks:
- id: commitizen
# - id: commitizen-branch
# stages:
# - pre-push
- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: v1.10.0
hooks:
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
exclude: .devcontainer/|.vscode/
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
types: [python]
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
types: [python]
- repo: "https://github.com/adrienverge/yamllint.git"
rev: v1.36.0
hooks:
- id: yamllint
files: ^.*\.(yaml|yml)$
entry: yamllint --strict --config-file .yamllint.yml
- repo: "https://github.com/charliermarsh/ruff-pre-commit"
rev: "v0.10.0"
hooks:
- id: ruff
exclude: tests/
args: [--no-fix]
- id: ruff-format
args: [--check]
- repo: "https://github.com/crate-ci/typos"
rev: v1.30.2
hooks:
- id: typos
args: ["--force-exclude"]
stages: [commit-msg, pre-commit]
- repo: "https://github.com/djlint/djLint"
rev: v1.36.4
hooks:
- id: djlint
args: ["--configuration", "pyproject.toml"]
- repo: "https://github.com/fpgmaas/deptry.git"
rev: "0.23.0"
hooks:
- id: deptry
- repo: "https://github.com/gitleaks/gitleaks"
rev: v8.24.0
hooks:
- id: gitleaks
- repo: "https://github.com/crate-ci/committed"
rev: v1.1.7
hooks:
- id: committed
stages: [commit-msg]
- repo: local
hooks:
- id: shellcheck
name: shellcheck
entry: shellcheck --check-sourced --severity=warning
language: system
types: [shell]
- id: mypy
name: mypy
entry: mypy --config-file pyproject.toml
exclude: "tests/|duties.py"
language: system
types: [python]
- id: pytest
name: pytest
entry: duty test
language: system
pass_filenames: false
files: |
(?x)^(
src/|
tests/|
uv\.lock|
pyproject\.toml
)
ci:
autofix_commit_msg: |
fix: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: "build: pre-commit autoupdate"
autoupdate_schedule: quarterly
skip: [pytest, deptry, mypy, shellcheck]
submodules: false