forked from databand-ai/dbnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
45 lines (42 loc) · 1.16 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
exclude: >
(?x)^(
.+/airflow_override/.+|
.+/_vendor/.+|
.+/_vendor_package/.+|
.+/docs/sdk-docs/.+
)$
repos:
# Keep autoflake as a first hook
# it may change you code without fixing formatting
# so following isort&black will do the rest
- repo: https://github.com/fsouza/autoflake8
rev: v0.3.1
hooks:
- id: autoflake8
args: ['--in-place', '--verbose']
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
language_version: python3
# support running black from parent dirrectory and from dbnd-core root:
entry: >
sh -c '
if test -f "dbnd-core/pyproject.toml"; then
black --config dbnd-core/pyproject.toml "$@"
else
black "$@"
fi;
' --
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
args: [--resolve-all-configs]
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=3000' ]
- id: trailing-whitespace