-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
28 lines (26 loc) · 864 Bytes
/
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
[tox]
requires = tox>4
envlist = py39, py311, ruff, black, mypy, bandit, pip-audit, vulture, vulture_test
isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre = poetry install --no-root --without=linter
commands = pytest -vvv {posargs}
# disable the keyring since there is not X11 within tox
setenv = PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
[testenv:{ruff, black, mypy, bandit, pip-audit, vulture, vulture_test}]
basepython = 311
allowlist_externals = poetry
commands_pre = poetry install --no-root
commands =
ruff: ruff .
black: black --check --diff --color .
# type checker
mypy: mypy .
# find unsafe code
bandit: bandit --recursive . --config pyproject.toml
# find vulnerable dependencies
pip-audit: pip-audit
# find unused code
vulture: vulture
vulture_test: vulture tests python_tool_competition_2024