-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
34 lines (30 loc) · 1.26 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
# Keep uv-lock up-to-date after pre-commit changes.
repos:
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.5.13
hooks:
- id: uv-lock
# Auto-export uv.lock to requirements.txt
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.5.13
hooks:
- id: uv-export
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff # linter
args: [--fix]
- id: ruff-format # formatter
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files # Check if a file >5MB is trying to be committed. It may be a sign that a data file or Notebook with Outputs is being committed, which we don't want
args: ["--maxkb=5000"]
- id: check-merge-conflict # Check for leftover merge conflict strings in the code
- id: check-toml # Ensure .toml files are formatted correctly
- id: check-yaml # Ensure .yaml files are formatted correctly
- id: debug-statements # Check for leftover debugger commands in the code
- id: detect-private-key # Check for references to private keys, which shouldn't be commited to Git
- id: no-commit-to-branch # Don't allow commits directly to `main`