-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
108 lines (95 loc) · 2.85 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
103
104
105
106
107
108
---
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
exclude: tests/.*$
# For IDE-integration outside of the pre-commit hook,
# see: https://black.readthedocs.io/en/stable/editor_integration.html
- repo: https://github.com/ambv/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/cruft/cruft
rev: 2.11.1
hooks:
- id: cruft
name: cruft
language: system
# Log status but always succeed, providing downstream project
# maintainers template synchronization discretion.
# see: https://stackoverflow.com/a/59745587
verbose: true
entry: bash -c 'cruft check || true' --
- repo: https://github.com/Yelp/detect-secrets
rev: v1.3.0
hooks:
- id: detect-secrets
exclude: ^(poetry\.lock|\.cruft\.json)$
- repo: https://github.com/flakeheaven/flakeheaven
rev: 3.0.0
hooks:
- id: flakeheaven
exclude_types: [jupyter]
# Docstring coverage tool
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
args: [-vv, --config=pyproject.toml]
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.2
hooks:
- id: markdown-toc
args: [--maxdepth=3, -i]
exclude: ^((docs/source|pytudes)/.*)$
- repo: local
hooks:
- id: mypy
name: mypy
language: system
entry: .tox/precommit/bin/mypy
args: [--cache-dir=/dev/null, --config-file=pyproject.toml]
types: [python]
- repo: local
hooks:
- id: pylint
name: pylint
language: system
entry: .tox/precommit/bin/pylint
args: [--rcfile=pyproject.toml]
types: [python]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: script-must-have-extension
- id: script-must-not-have-extension
- repo: https://github.com/asottile/pyupgrade
rev: v2.38.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
hooks:
- id: yamllint
args: ['-d {extends: default, rules: {line-length: {max: 120, level: warning}}}']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files # Ignored for git-lfs files
args: [--maxkb=100000] # 100MB
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer # Ensure files ONLY end in a newline
exclude_types: [jupyter]
- id: pretty-format-json # Sort and indent
args: [--autofix]
exclude: ^(\.cruft\.json)$
- id: trailing-whitespace # Trim
args: [--markdown-linebreak-ext=md]