-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy path.pre-commit-config.yaml
71 lines (63 loc) · 1.63 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
default_language_version:
python: python3.10
minimum_pre_commit_version: 3.8.0
repos:
# - repo: meta
# hooks:
# - id: check-hooks-apply
# - id: check-useless-excludes
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.5.10
hooks:
- id: uv-lock
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.6.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- id: pretty-format-toml
args: [--autofix]
exclude: tach.toml
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes, --indent, "2"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
types_or: [markdown, json]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
exclude: ^\..*$
types: [python]
args: [--comment-style, "|#|", --license-filepath, ./HEADER.txt, --fuzzy-match-generates-todo]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
files: ^src/ # TODO(egparedes): also add the `tests` folder here
args: [--fix]
- id: ruff-format
- repo: https://github.com/gauge-sh/tach-pre-commit
rev: v0.23.0
hooks:
- id: tach
- repo: local
hooks:
- id: mypy
name: mypy static type checker
entry: uv run --frozen mypy --no-install-types src/
language: system
types_or: [python, pyi]
pass_filenames: false
require_serial: true
stages: [pre-commit]