-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
121 lines (108 loc) · 3.08 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
repos:
- repo: https://github.com/mxr/sync-pre-commit-deps
rev: v0.0.1
hooks:
- id: sync-pre-commit-deps
name: sync pre-commit dependencies
- repo: https://github.com/pdm-project/pdm
rev: 2.21.0
hooks:
- id: pdm-lock-check
name: check pdm lock file
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
name: check yaml files (yamllint)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-json
- id: check-yaml
- id: check-vcs-permalinks
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: mixed-line-ending
- id: fix-byte-order-marker
# - id: no-commit-to-branch TODO (temporary for development)
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
name: upgrade to python 3.12 syntax (pyupgrade)
args:
- --py310-plus
- repo: https://github.com/hadialqattan/pycln
rev: v2.5.0
hooks:
- id: pycln
name: remove unused imports (pycln)
args:
- --all
- --disable-all-dunder-policy
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
name: make imports absolute
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: 0.3.4
hooks:
- id: auto-walrus
name: apply walrus operator
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
- id: ruff
name: lint code (ruff)
args:
- --fix
- id: ruff-format
name: format code (ruff)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
name: lint code typing (mypy)
additional_dependencies:
- pandas-stubs
- types-docutils
- types-PyYAML
- types-requests
- types-setuptools
- types-protobuf
- pydantic==2.10.3
- pytest==8.3.4
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
name: lint code security issues (bandit)
args: ["-c", "pyproject.toml"]
additional_dependencies:
- bandit[toml]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: lint docs spelling (codespell)
additional_dependencies:
- tomli
# FIXME false positive: unknown permission scope "attestations".
# - repo: https://github.com/rhysd/actionlint
# rev: v1.6.27
# hooks:
# - id: actionlint
# name: lint Github Actions workflows (actionlint)