-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
102 lines (89 loc) · 2.57 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
repos:
- repo: local
hooks:
- id: bandit
name: bandit
language: system
entry: poetry run bandit -c pyproject.toml
- id: black
name: black
language: system
types: [python]
entry: poetry run black --config pyproject.toml
- id: detect-secrets
name: detect-secrets
language: system
entry: poetry run detect-secrets-hook
exclude: ^(poetry\.lock|\.cruft\.json|\.ipynb)$
#
exclude_types: [jupyter]
#
- id: interrogate
name: interrogate
language: system
pass_filenames: false
entry: poetry run interrogate
- id: isort
name: isort
language: system
types: [python]
entry: poetry run isort
- id: mypy
name: mypy
language: system
types: [python]
entry: poetry run mypy
#
exclude: ^(notebooks/.*\.py)$
#
- id: pylint
name: pylint
language: system
types: [python]
entry: poetry run pylint --rcfile=pyproject.toml
#
exclude: ^(notebooks/.*\.py)$
#
- id: pyupgrade
name: pyupgrade
language: system
types: [python]
entry: poetry run pyupgrade
- id: yamllint
name: yamllint
language: system
files: .*\.(yml|yaml)
entry: poetry run yamllint --config-file=yamllint-config.yml
- id: check-added-large-files
name: check-added-large-files
language: system
# 100MB
entry: poetry run check-added-large-files --maxkb=100000
- id: check-ast
name: check-ast
language: system
types: [python]
entry: poetry run check-ast
- id: debug-statement-hook
name: debug-statement-hook
language: system
types: [python]
entry: poetry run debug-statement-hook
- id: end-of-file-fixer
name: end-of-file-fixer # Ensure files ONLY end in a newline
language: system
types: [text]
entry: poetry run end-of-file-fixer
exclude_types: [jupyter]
- id: pretty-format-json
name: pretty-format-json # Sort and indent
language: system
files: .*\.json
entry: poetry run pretty-format-json --autofix --no-ensure-ascii
exclude: ^(\.cruft\.json)$
- id: trailing-whitespace-fixer
name: trailing-whitespace-fixer # Trim
language: system
types: [text]
entry: poetry run trailing-whitespace-fixer --markdown-linebreak-ext=md