Skip to content

Commit 379c280

Browse files
author
muxator
committed
tox: let's take commands from the Makefile where possible (ACHTUNG: just lints for now: COMPLETE_ME)
The "make" command should be available on every supported platform in our Github CI runners.
1 parent 99bcc44 commit 379c280

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

tox.ini

+12-14
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ basepython = python3
1010

1111
[testenv]
1212
# From Poetry FAQ "Is tox supported?" (https://python-poetry.org/docs/faq/#use-case-2)
13-
allowlist_externals = poetry
13+
allowlist_externals =
14+
make
15+
poetry
1416
skip_install = True
1517
setenv =
1618
PYTHONPATH = {toxinidir}
@@ -35,42 +37,38 @@ commands = pytest examples/tests_on_toy_model.ipynb --nbmake --nbmake-timeout=30
3537
[testenv:mypy]
3638
deps =
3739
commands_pre = poetry install --only main --only testenv --only mypy --sync
38-
commands =
39-
mypy black_it tests scripts examples
40+
commands = make static
4041

4142
[testenv:black]
4243
commands_pre = poetry install --only black --sync
43-
commands = black .
44+
commands = make black
4445

4546
[testenv:black-check]
4647
commands_pre = poetry install --only black --sync
47-
commands = black --check --verbose .
48+
commands = make black-check
4849

4950
[testenv:ruff]
5051
commands_pre = poetry install --only ruff --sync
51-
commands = ruff check --fix --show-fixes .
52+
commands = make ruff
5253

5354
[testenv:ruff-check]
5455
commands_pre = poetry install --only ruff --sync
55-
commands = ruff check .
56+
commands = make ruff-check
5657

5758
[testenv:bandit]
5859
skipsdist = True
5960
commands_pre = poetry install --only bandit --sync
60-
commands = bandit --configfile .bandit.yaml --recursive black_it tests scripts examples
61+
commands = make bandit
6162

6263
[testenv:vulture]
6364
skipsdist = True
6465
commands_pre = poetry install --only vulture --sync
65-
commands =
66-
vulture black_it scripts/whitelists/package_whitelist.py
67-
vulture examples scripts/whitelists/examples_whitelist.py
68-
vulture tests scripts/whitelists/tests_whitelist.py
66+
commands = make vulture
6967

7068
[testenv:darglint]
7169
skipsdist = True
7270
commands_pre = poetry install --only darglint --sync
73-
commands = darglint black_it
71+
commands = make darglint
7472

7573
[testenv:docs]
7674
# From Poetry FAQ "Is tox supported?" (https://python-poetry.org/docs/faq/#use-case-2)
@@ -88,7 +86,7 @@ commands =
8886

8987
[testenv:check-copyright]
9088
deps =
91-
commands = python3 scripts/check_copyright.py
89+
commands = make check-copyright
9290

9391
[testenv:spell_check]
9492
deps =

0 commit comments

Comments
 (0)