-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
88 lines (78 loc) · 1.99 KB
/
.pre-commit-config.yaml
File metadata and controls
88 lines (78 loc) · 1.99 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
85
86
87
88
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# These are the most critical checks.
#
- id: check-ast
# Some basic sanitization.
#
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: mixed-line-ending
args: [--fix=lf]
- id: debug-statements
# Checking data formats.
#
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-xml
# Check for secrets.
#
# - id: check-private-key
# - id: detect-aws-credentials
# Try to catch some faux-pas.
#
# - id: no-commit-to-branch
# args: [--branch, master]
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict
- id: check-symlinks
# Try to catch some more obscure things.
#
- id: check-executables-have-shebangs
- id: check-case-conflict
# This checks that all links to our VCS are permalinks. How oddly specific!
- id: check-vcs-permalinks
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/mgedmin/check-manifest
rev: '0.50'
hooks:
- id: check-manifest
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
hooks:
- id: mypy
exclude: |
(?x)^(
tests/|
docs/|
\.egg-info/|
build/
)
additional_dependencies:
- pytest
- pydantic
- aiofiles
- types-aiofiles