-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
75 lines (70 loc) · 1.72 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
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
-
id: end-of-file-fixer
exclude: 'website/'
- id: check-toml
# - id: check-yaml
- id: check-json
- id: check-added-large-files
# - id: name-tests-test
- id: debug-statements
- repo: https://github.com/ambv/black
rev: 23.1.0
hooks:
- id: black
# args:
# - --diff
# - --check
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort
args:
# - --diff
# - --check
- --profile=black
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [
'flake8-eradicate==1.4.0',
'flake8-bugbear==22.9.23',
'flake8-docstrings==1.6.0',
'flake8-print==5.0.0',
'pep8-naming==0.13.2',
]
args:
- "--config=setup.cfg"
- repo: https://github.com/PyCQA/pylint
rev: v2.17.2
hooks:
- id: pylint
language: system
files: ^(maxbot)/.*\.py$
args:
- --rcfile=setup.cfg
# run pylint across multiple cpu cores to speed it up-
# https://pylint.pycqa.org/en/latest/user_guide/run.html?#parallel-execution to know more
- --jobs=0
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
additional_dependencies: ['.[toml]']
args: [-c, pyproject.toml]
- repo: local
hooks:
- id: unittests
name: unittests
stages: ["push"]
entry: make test
language: system
always_run: True
pass_filenames: false