-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
60 lines (51 loc) · 1.37 KB
/
tox.ini
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
[vars]
METRICS_MODULE = metrics
METRICS_SOURCE = {[vars]METRICS_MODULE}
MYPY_SOURCE_ARGS = --strict --allow-untyped-decorators --ignore-missing-imports
[tox]
envlist = mypy,
black,
pylint,
yamllint,
bandit,
safety
skipsdist = True
[testenv:pylint]
basepython = python3
skip_install = true
deps = -r requirements-dev.txt
-r requirements.txt
commands = pylint {[vars]METRICS_SOURCE} \
--min-similarity-lines 6 \
--max-line-length 88 \
-d fixme,unsubscriptable-object
[testenv:black]
deps = -r requirements-dev.txt
commands = black --check --diff .
[testenv:black-format]
# this step format code automatically based on black rules
# it can be triggered manually
deps = -r requirements-dev.txt
commands = black .
# Static analysis for python
# requires type-hints
# https://mypy.readthedocs.io/en/latest/
[testenv:mypy]
deps = -r requirements-dev.txt
commands = mypy {[vars]MYPY_SOURCE_ARGS} {[vars]METRICS_SOURCE}
[testenv:yamllint]
basepython = python3
deps = -r requirements-dev.txt
files =
.
commands =
yamllint -s {[testenv:yamllint]files}
[testenv:bandit]
deps = -r requirements-dev.txt
commands = bandit -r metrics -ll
[testenv:safety]
deps = -r requirements-dev.txt
commands = safety check \
-r requirements.txt \
-r requirements-dev.txt \
-i 45114