-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
55 lines (53 loc) · 1.47 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
# to run pre-commit on demand using below configuration:
# pre-commit run --all-files
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-ast
- id: end-of-file-fixer
exclude: ^test
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^test
- id: check-added-large-files
args: ['--maxkb=1000']
exclude: ^test
# black
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
exclude: ^test/|^docs/
args:
- "--line-length=88"
# flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
exclude: ^test/|^docs/
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: ^test/|^docs/
# pylint, to run it directly use: python -m pylint . --rcfile=pylintrc
# enabled only spelling checks for docstrings
- repo: local
hooks:
- id: pylint
name: pylint
entry: python -m pylint
language: system
args:
- "--rcfile=pylintrc"
exclude: ^test/|gitignore|LICENSE|requirements|pre-commit-config|pylintrc|.*\.png$