forked from kedro-org/kedro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
80 lines (75 loc) · 2.75 KB
/
.pre-commit-config.yaml
File metadata and controls
80 lines (75 loc) · 2.75 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
75
76
77
78
79
80
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml # Checks yaml files for parseable syntax.
exclude: "^kedro/template/"
- id: check-json # Checks json files for parseable syntax.
- id: check-added-large-files
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls in python source.
exclude: "^kedro/template/"
- id: detect-private-key # Detects the presence of private keys
- id: requirements-txt-fixer # Sorts entries in requirements.txt
- id: flake8
exclude: "^kedro/template/"
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
exclude: "^kedro/template/"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.720
hooks:
- id: mypy
args: [--allow-redefinition, --ignore-missing-imports]
exclude: |
(?x)(
^kedro/template/|
^docs/
)
- repo: local
hooks:
# It's impossible to specify per-directory configuration, so we just run it many times.
# https://github.com/PyCQA/pylint/issues/618
- id: pylint-kedro
name: "PyLint on kedro/*"
language: system
pass_filenames: false
stages: [push]
entry: pylint -j0 --disable=unnecessary-pass kedro
- id: pylint-features
name: "PyLint on features/*"
language: system
pass_filenames: false
stages: [push]
entry: pylint -j0 --disable=missing-docstring,no-name-in-module features
- id: pylint-extras
name: "PyLint on extras/*"
language: system
pass_filenames: false
stages: [push]
entry: pylint -j0 extras
- id: pylint-tests
name: "PyLint on tests/*"
language: system
pass_filenames: false
stages: [push]
entry: pylint -j0 --disable=missing-docstring,redefined-outer-name,no-self-use,invalid-name tests
# We need to make some exceptions for 3.5, that's why it's a custom runner.
- id: black
name: "Black"
language: system
pass_filenames: false
entry: python -m tools.black_runner kedro extras features tests
- id: legal
name: "Licence check"
language: system
pass_filenames: false
entry: make legal