-
Notifications
You must be signed in to change notification settings - Fork 123
/
tox.ini
44 lines (40 loc) · 1.29 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
# Benefits of using tox:
#
# 1. makes sure we are testing west as installed by setup.py
# 2. avoid touching user global / system config files
# 3. avoid touching any git repositories outside of tmpdirs
# 4. ensure global / system config settings have no effect on the tests
[tox]
envlist=py3
[flake8]
# We explicitly disable the following errors:
#
# - E126: continuation line over-indented for hanging indent
# - E261: at least two spaces before inline comment
# - E302: expected 2 blank lines, found 1
# - E305: expected 2 blank lines after class or function definition, found 1
# - W504: line break after binary operator
ignore = E126,E261,E302,E305,W504
# Don't lint setup.py, the .tox or python virtualenv directory, or the build directory
exclude = setup.py,.tox,.venv,build
max-line-length = 100
[mypy]
mypy_path=src
ignore_missing_imports=True
[testenv]
deps =
setuptools-scm
pytest
pytest-cov
types-PyYAML
flake8
mypy
ruff
setenv =
# For instance: ./.tox/py3/tmp/
TOXTEMPDIR={envtmpdir}
commands =
python -m pytest --cov-report=html --cov=west {posargs:tests} --basetemp='{envtmpdir}/pytest with space/'
python -m flake8 --config='{toxinidir}'/tox.ini '{toxinidir}'
python -m ruff check '{toxinidir}'
python -m mypy --config-file='{toxinidir}'/tox.ini --package=west