-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
127 lines (115 loc) · 3.28 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright (c) 2020-present, The Johann Plugin Example Authors. All Rights Reserved.
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE file. See the AUTHORS file for names of contributors.
default_stages: [commit, push]
repos:
- repo: meta
hooks:
- id: check-hooks-apply
stages: [manual]
- id: check-useless-excludes
stages: [manual]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
hooks:
- id: check-ast
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-docstring-first
- id: check-added-large-files
- id: detect-private-key
- id: mixed-line-ending
- id: name-tests-test
- id: check-json
- id: check-yaml
- repo: https://github.com/timothycrosley/isort
rev: 5.0.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
- repo: https://github.com/prettier/prettier
rev: 2.0.5
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
args: [--config=setup.cfg]
additional_dependencies: [flake8-bugbear]
- repo: https://github.com/jazzband/pip-tools
rev: 5.2.1
hooks:
- id: pip-compile
args: [
--quiet,
--generate-hashes,
--no-emit-index-url,
--pip-args=--isolated, # ignore PIP_INDEX_URL, etc
]
files: ^((requirements(-.*)?\.(in|txt))|setup.py)$
- id: pip-compile
name: pip-compile-dev
args: [
--quiet,
--generate-hashes,
--no-emit-index-url,
--pip-args=--isolated, # ignore PIP_INDEX_URL, etc
--allow-unsafe,
--output-file=requirements-dev.txt,
requirements-dev.in,
]
files: ^((requirements(-.*)?\.(in|txt))|setup.py)$
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
entry: bandit -lll
exclude: tests
- repo: https://github.com/PyCQA/pylint
rev: master
hooks:
- id: pylint
stages: [manual] # PLANNED: [commit]
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.4.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: local
hooks:
- id: check-todo
name: check-todo
language: pygrep
entry: (TODO|FIXME|FOOBAR|LEFT OFF HERE)
args: [-i]
exclude: .pre-commit-config.yaml
- id: check-copyright-headers
name: check-copyright-headers
language: script
entry: scripts/check_copyright_headers.py
exclude: |
(?x)^(
\..+\.cfg|
\..+\.toml|
.*\.in|
.*\.md|
.*\.txt|
.gitignore|
AUTHORS|
LICENSE|
)$
- id: mypy-local
name: mypy-local
entry: mypy
language: system
types: [python]
args: ["--ignore-missing-imports", "--scripts-are-modules"]
require_serial: true
stages: [manual] # PLANNED: [commit]