-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
74 lines (69 loc) · 1.78 KB
/
.pre-commit-config.yaml
File metadata and controls
74 lines (69 loc) · 1.78 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# Identify invalid files
- id: check-ast
- id: check-yaml
- id: check-json
- id: check-toml
# git checks
- id: check-merge-conflict
- id: check-added-large-files
exclude: ^test/resources/.+
- id: detect-private-key
- id: check-case-conflict
# Python checks
- id: check-docstring-first
- id: debug-statements
- id: requirements-txt-fixer
- id: fix-byte-order-marker
# General quality checks
- id: mixed-line-ending
args: [--fix=lf]
exclude: ^test/resources/
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: |
(?x)^(
^test/resources/.+|
^puremagic/magic_data.json
)$
- id: check-executables-have-shebangs
- id: end-of-file-fixer
exclude: ^test/resources/.+
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.15.5
hooks:
# Run the linter.
- id: ruff-check
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: ty
name: ty
entry: uv run ty check
language: system
types: [python]
pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: [--ignore-words-list, "addin,caf,tye,wors"]
exclude: |
(?x)^(
test/resources/|
.*\.json$
)
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.16.2
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject