-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (57 loc) · 1.9 KB
/
.pre-commit-config.yaml
File metadata and controls
63 lines (57 loc) · 1.9 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
types: [file, text]
- id: end-of-file-fixer
types: [python]
- id: requirements-txt-fixer
- id: mixed-line-ending
types: [python]
args: [--fix=no]
- id: check-added-large-files
args: [--maxkb=1024]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.0
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- "--ignore-words=.dict-allowed.txt"
# skip jupyter notebook as there isn't a good way to only match inputs
# at the moment. manually fixing up outputs would be a pain and we
# cannot always expect to regex them out.
- "--ignore-regex='base64,.*?=='"
additional_dependencies:
- tomli
# - repo: https://github.com/google/addlicense
# rev: 55a521b
# hooks:
# - id: addlicense
# args: ["-c", "Company, Inc", "*.py"]
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.5
hooks:
- id: uv-lock
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
- id: uv-export
# yamllint disable-line rule:line-length
args: ["--frozen", "--output-file=requirements.txt", "--no-dev", "--no-hashes"]
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
- id: uv-export
# yamllint disable-line rule:line-length
args: ["--frozen", "--output-file=requirements-dev.txt", "--only-dev", "--no-hashes"]
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$