-
Notifications
You must be signed in to change notification settings - Fork 28
/
.pre-commit-config.yaml
76 lines (75 loc) · 1.97 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
72
73
74
75
76
ci:
skip:
- pytest
- demo
- usage
default_language_version:
python: python3.9
exclude: examples/
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: assets/images/demo.svg
- id: sort-simple-yaml
files: airflow_diagrams/abbreviations.yml|examples/mapping.yml
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies:
- types-requests
- types-PyYAML
- types-toml
- repo: https://github.com/asottile/dead
rev: v1.5.2
hooks:
- id: dead
args: ["--exclude", "examples/"] # global exclude does not work
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
args:
- --fix
- --unsafe-fixes
- id: ruff-format
- repo: https://github.com/crate-ci/typos
rev: v1.27.0
hooks:
- id: typos
exclude: \.svg$
- repo: local
hooks:
- id: pytest
name: Run pytest
entry: poetry run pytest
language: system
pass_filenames: false
# alternatively you could `types: [python]` so it only runs when python files change
# though tests might be invalidated if you were to say change a data file
always_run: true
- id: demo
name: Recreate demo
entry: task demo
language: system
files: ^airflow_diagrams/|^dev/demo/
types: [file, python]
pass_filenames: false
- id: usage
name: Recreate usage
entry: task usage
language: system
files: airflow_diagrams/cli.py
pass_filenames: false