-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
71 lines (65 loc) · 1.92 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
exclude: >
(?x)(
\.mypy_cache/
| \.pytest_cache/
| \.venv/
| build/
| dist/
| notebooks/
| tools/cookiecutter/{{
| \S+\.egg-info/
)
repos:
- repo: https://github.com/srstevenson/nb-clean
rev: 3.0.1
hooks:
- id: nb-clean
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: mixed-line-ending
- id: check-added-large-files
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
hooks:
- id: yamllint
args: [-d=relaxed]
exclude: "apps/.*/deploy/templates/.*"
- repo: local
hooks:
# these first two hooks actually modify files, so let's run them
# early, before other checks even happen.
- id: isort
name: isort
language: system
require_serial: true
types: [python]
entry: uv run isort
- id: black
name: black
language: system
require_serial: true
types: [python]
entry: uv run black --config pyproject.toml
- id: flake8
name: flake8
language: system
require_serial: true
types: [python]
entry: uv run flake8 --config .flake8
- id: project-mypys
name: project-mypys
language: system
verbose: true
always_run: true
require_serial: true
pass_filenames: false
files: ^(libs/.*|apps/.*)
# have to pass --only-changed here and *no* filenames to ensure running against projects with deleted files
# only run on non-merge commits - assume that main has already performed these checks
entry: ./scripts/run-if-not-merge.sh uv run mono typecheck --skip-setup --include-downstream --only-changed