-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
54 lines (48 loc) · 1.23 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
[tox]
envlist = black,isort,autoformat,flake8,mypy,py39
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements.dev.txt
pytest-cov==4.0.0
setenv =
PYTHONPATH=./mastko:
commands =
pytest --cov={toxinidir}/mastko --cov-branch --cov-report=term-missing {posargs}
[testenv:black]
skip_install = true
basepython = python3
deps =
black==23.3.0
commands =
black --check --line-length 110 {toxinidir}/mastko/
[testenv:isort]
skip_install = true
basepython = python3
deps =
isort==5.12.0
commands =
isort --profile black --check-only --diff --src {toxinidir}/mastko/ {toxinidir}/mastko/
[testenv:flake8]
skip_install = true
basepython = python3
deps =
flake8==6.0.0
commands =
flake8 --max-line-length=110 --max-complexity=10 {toxinidir}/mastko/
[testenv:mypy]
skip_install = true
basepython = python3
deps =
mypy==1.2.0
commands =
mypy --disallow-untyped-defs --check-untyped-defs --install-types --non-interactive {toxinidir}/mastko/ --exclude '(^|/)tests/'
[testenv:autoformat]
skip_install = true
basepython = python3
deps =
{[testenv:black]deps}
{[testenv:isort]deps}
commands =
black --line-length 110 {toxinidir}/mastko/
isort --atomic --profile black --src {toxinidir}/mastko/ {toxinidir}/mastko/