-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
70 lines (60 loc) · 1.69 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
[tox]
skipsdist = True
[flake8]
# it's not a bug that we aren't using all of hacking, ignore:
# F812: list comprehension redefines ...
# 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
ignore = F812,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501,E241,E123,W504,E226,E221,F841,W291,W293,W503
max-line-length = 160
exclude = tests/*
max-complexity = 10
# per-file-ignores = __init__.py: F401 # imported but unused
[pydocstyle]
add_ignore = D202, D413
[testenv:maya]
deps =
pytest
pytest-cov
whitelist_externals =
echo
mayapy
setenv =
PYTHONDONTWRITEBYTECODE = 1
PYTHONPATH={envsitepackagesdir};{toxinidir}/src
PATH={envsitepackagesdir};{env:PATH}
commands =
"{env:MAYA_LOCATION}/bin/mayapy.exe" -m pytest \
--cov=src \
--cov-report term-missing \
-p no:warnings \
-p no:cacheprovider \
-xv \
{posargs:./tests/maya}
[testenv:black]
whitelist_externals =
black
setenv =
PYTHONDONTWRITEBYTECODE = 1
commands =
black --line-length 88 ./python ./tests
install_commands =
pip3 install black[python27]
[testenv:lint]
deps =
flake8
pydocstyle
setenv =
PYTHONDONTWRITEBYTECODE = 1
passenv = PYTHONPATH
commands =
python -m flake8 ./python
python -m pydocstyle ./python