-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
.pre-commit-config.yaml
53 lines (52 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-ast
exclude: .+_py2.py # skip Python2 files
- 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: 22.8.0
hooks:
- id: black
exclude: ^test/|^docs/|gitignore|README|LICENSE|requirements|pre-commit-config|pylintrc|readthedocs|.+_py2.py
args:
- "--line-length=88"
# uncomment and fix it whenevere have time:
# # flake8
# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v2.3.0
# hooks:
# - id: flake8
# exclude: ^test/|^docs/|gitignore|README|LICENSE|requirements|pre-commit-config|pylintrc|readthedocs
# args:
# - "--max-line-length=88"
# - "--max-complexity=19"
# - "--select=B,C,E,F,W,T4,B9"
# - "--ignore=F403,E402,E722,E203,W503,C901,E501,F821"
# # bandit - security checks
# - repo: https://github.com/PyCQA/bandit
# rev: 1.7.0
# hooks:
# - id: bandit
# exclude: ^test/|^docs/|gitignore|README|LICENSE|requirements|pre-commit-config|pylintrc|readthedocs
# # 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: ^test/|^docs/|gitignore|README|LICENSE|requirements|pre-commit-config|pylintrc|readthedocs