-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.pre-commit-config.yaml
114 lines (102 loc) · 3.3 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
default_language_version:
python: python3.13
repos:
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
hooks:
# Run the linter.
- id: ruff
types_or: [python, jupyter, pyi]
args: [--fix]
# Run the formatter.
- id: ruff-format
types_or: [python, jupyter, pyi]
- repo: https://github.com/biomejs/pre-commit
rev: "v0.6.1"
hooks:
- id: biome-check
language: node
additional_dependencies: ["@biomejs/[email protected]"]
exclude: (src/codemods/eval)|(tests/unit/skills/snapshots)|(tests/unit/codegen/sdk/output)|(tests/integration/verified_codemods)|(docs/samples)
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.6
hooks:
- id: cython-lint
- id: double-quote-cython-strings
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: tests/
exclude_types: [mdx, pyi]
- id: check-yaml
- id: end-of-file-fixer
exclude: (src/codemods/eval)|(tests/unit/skills/snapshots)|(tests/unit/codegen/sdk/output)|(tests/integration/verified_codemods)|(docs/)
- id: check-merge-conflict
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.1
hooks:
- id: check-github-workflows
- id: check-github-actions
args: ["--verbose"]
- repo: https://github.com/mxr/sync-pre-commit-deps
rev: v0.0.3
hooks:
- id: sync-pre-commit-deps
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
language: python
additional_dependencies:
- tomli
files: "docs/.*/.*.mdx"
- repo: https://github.com/fpgmaas/deptry.git
rev: "0.23.0"
hooks:
- id: deptry
pass_filenames: false
always_run: true
entry: bash -c "uv run --frozen --all-extras --dev deptry src --ignore DEP001 --extend-exclude 'codegen-examples/.*'"
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 39.169.3
hooks:
- id: renovate-config-validator
- repo: https://github.com/astral-sh/uv-pre-commit
rev: "0.5.31"
hooks:
- id: uv-sync
args: ["--frozen", "--all-packages", "--all-extras"]
- repo: "local"
hooks:
# Disabled as part of LFS removal.
# - id: disallowed-words-check
# name: Check for disallowed words
# entry: scripts/disallowed-words-check.sh
# language: script
# files: '' # Check all files
- id: generate-runner-imports
name: Generate Runner Imports
entry: bash -c "uv run --frozen python -m codegen.gscli.cli generate runner-imports src/codegen/shared/compilation/function_imports.py"
language: system
pass_filenames: false
always_run: true
- repo: https://github.com/hukkin/mdformat
rev: 0.7.22 # Use the ref you want to point at
hooks:
- id: mdformat
language: python
# Optionally add plugins
additional_dependencies:
- mdformat-gfm
- mdformat-ruff
- mdformat-config
- mdformat-pyproject