-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
53 lines (51 loc) · 1.76 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
# to run pre-commit on demand using below configuration:
# pre-commit run --all-files
default_language_version:
python: python3.7
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-ast
- id: end-of-file-fixer
exclude: ^tests/
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^tests/
- id: check-added-large-files
args: ['--maxkb=1000']
# black
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
exclude: ^tests/|^docs/|^Executable/|gitignore|README|LICENSE|MANIFEST|requirements|^templates/|pre-commit-config|pylintrc
args:
- "--line-length=88"
# flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
exclude: ^tests/|^docs/|^Executable/|gitignore|README|LICENSE|MANIFEST|requirements|^templates/|pre-commit-config|pylintrc
args:
- "--max-line-length=88"
- "--max-complexity=19"
- "--select=B,C,E,F,W,T4,B9"
- "--ignore=F403,E402,E722,E203,W503,C901,E501"
# bandit - security checks
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
hooks:
- id: bandit
exclude: ^tests/|^docs/|^Executable/|gitignore|README|LICENSE|MANIFEST|requirements|^templates/|pre-commit-config|pylintrc
# pylint, to run it directly use: python3 -m pylint ./ttr/ --rcfile=pylintrc
- repo: local
hooks:
- id: pylint
name: pylint
entry: python3 -m pylint
language: system
args:
- "--rcfile=pylintrc"
exclude: ^tests/|^docs/|^Executable/|gitignore|README|LICENSE|MANIFEST|requirements|^ttr/templates/|pre-commit-config|pylintrc|^\.github