-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
100 lines (92 loc) · 2.74 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
100 lines (92 loc) · 2.74 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
89
90
91
92
93
94
95
96
97
98
99
100
default_language_version:
python: python3.12
default_stages:
- pre-commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Excluded per hook rather than globally: a formatter's fix to generated
# or vendored code is lost on the next refresh, but the security hooks
# below have to read every file in the tree.
- id: trailing-whitespace
exclude: &generated "^(src/unstract/llmwhisperer/_sdk_llmwhisperer/|tests/baseline/)"
exclude_types:
- "markdown"
- id: end-of-file-fixer
exclude: *generated
- id: check-yaml
args: [--unsafe]
- id: check-added-large-files
args: ["--maxkb=10240"]
- id: check-case-conflict
- id: check-docstring-first
exclude: *generated
- id: check-ast
- id: check-json
exclude: ".vscode/launch.json"
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: debug-statements
- id: detect-private-key
- id: check-merge-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: forbid-new-submodules
- id: mixed-line-ending
exclude: *generated
- repo: https://github.com/astral-sh/ruff-pre-commit
# Kept in step with the pinned ruff in the dev group: two versions disagree
# on import order and docstrings, and each undoes the other's fixes.
rev: v0.11.9
hooks:
- id: ruff
args: [--fix]
exclude: *generated
- id: ruff-format
exclude: *generated
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
entry: uv run pycln
args: [--config=pyproject.toml]
exclude: *generated
- repo: https://github.com/pycqa/docformatter
rev: v1.7.5
hooks:
- id: docformatter
language: python
exclude: *generated
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
entry: pyupgrade --py39-plus --keep-runtime-typing
exclude: *generated
types:
- python
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.6.11
hooks:
- id: uv-lock
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
language: system
entry: uv run mypy .
pass_filenames: false
additional_dependencies: []
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: [--disable, MD013]
- id: markdownlint-fix
args: [--disable, MD013]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks