-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (63 loc) · 2.03 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
69 lines (63 loc) · 2.03 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: ["--fix=lf"]
# Linter revs AND the mypy type-stub deps are kept in lockstep with
# constraints/dev.lock so a contributor's local `pre-commit run` enforces
# the same versions the CI lint job pins. Bump these together with the lock.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.17
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.1.0
hooks:
- id: mypy
files: ^(client|server|formatters)\.py$
additional_dependencies: ["httpx==0.28.1", "mcp==1.27.2"]
- repo: https://github.com/PyCQA/bandit
rev: 1.9.4
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--ignore-words-list=nd,te,hsa"]
# Local hook: keep every version-bearing file in lockstep with
# pyproject.toml's [project].version. Catches drift before push;
# the same script is also enforced in CI via the contract test
# tests/contract/test_version_consistency.py.
- repo: local
hooks:
- id: check-versions
name: check-versions (pyproject is canonical)
entry: python scripts/check_versions.py
language: system
pass_filenames: false
files: |
(?x)^(
pyproject\.toml
|CITATION\.cff
|server\.json
|\.well-known/mcp\.json
|tests/unit/test_client_mutation_killers\.py
)$