-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
72 lines (60 loc) · 1.64 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
61
62
63
64
65
66
67
68
69
70
71
[tox]
minversion = 4.0.0
envlist = clean, flake8, mypy, py{39,310}
isolated_build = true
[testenv]
description = Run pytest in independent python env
setenv =
PYTHONPATH = {toxinidir}
deps =
pip
pytest
pytest-cov
commands =
python -m pip install --upgrade pip
pytest
[testenv:flake8]
description = run linter
basepython = python3.9
deps = flake8
skip_install = true
commands = flake8 {posargs:src tests}
[testenv:mypy]
description = run type checks
basepython = python3.9
deps = mypy
commands = mypy -p dynetan
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[flake8]
# To check error codes
# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
exclude = .git,
.pytest_cache,
.tox,
__pycache__,
docs/source/conf.py,
env,
build,
dist
doctests = False
# Default max-complexity was 10
max-complexity = 15
indent-size = 4
max-line-length = 90
# it's not a bug that we aren't using all of hacking, ignore:
# E272: multiple spaces before keyword (e.g. import)
# E221 multiple spaces before operator (e.g. =)
# H101: Use TODO(NAME)
# H202: assertRaises Exception too broad
# H233: Python 3.x incompatible use of print operator
# H301: one import per line
# H306: imports not in alphabetical order (time, os)
# H401: docstring should not start with a space
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# H501: Do not use self.__dict__ for string formatting
extend-ignore = E221,E272,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501