Skip to content

Commit 17cefaf

Browse files
henryiiigaborbernat
authored andcommitted
tox: format file
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent c48f4ca commit 17cefaf

2 files changed

Lines changed: 43 additions & 37 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ repos:
5050
- id: rst-backticks
5151
- id: rst-directive-colons
5252
- id: rst-inline-touching-normal
53+
- repo: https://github.com/tox-dev/tox-ini-fmt
54+
rev: "1.3.1"
55+
hooks:
56+
- id: tox-ini-fmt

tox.ini

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
11
[tox]
2-
envlist =
2+
requires =
3+
tox>=4.2
4+
virtualenv>=20.0.34
5+
env_list =
36
fix
47
type
58
docs
69
path
7-
{py312, py311, py310, py39, py38, py37, pypy37, pypy38, pypy39}{, -min}
8-
isolated_build = true
10+
{py312, py311, py310, py39, py38, py37, pypy39, pypy38, pypy37}{, -min}
911
skip_missing_interpreters = true
10-
minversion = 3.14
11-
requires =
12-
virtualenv>=20.0.34
1312

1413
[testenv]
1514
description =
1615
run test suite with {basepython}
17-
passenv =
16+
extras =
17+
test
18+
pass_env =
1819
LC_ALL
1920
PIP_*
2021
PYTEST_*
2122
TERM
22-
setenv =
23+
set_env =
2324
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
24-
TEST_STATUS_DIR = {envtmpdir}
2525
PYPY3323BUG = 1
2626
PYTHONWARNDEFAULTENCODING = 1
27-
extras =
28-
test
27+
TEST_STATUS_DIR = {envtmpdir}
2928
commands =
3029
pytest -ra --cov --cov-config pyproject.toml \
3130
--cov-report=html:{envdir}/htmlcov --cov-context=test \
3231
--cov-report=xml:{toxworkdir}/coverage.{envname}.xml {posargs:-n auto}
3332

3433
[testenv:fix]
3534
description = run static analysis and style checks
36-
passenv =
37-
HOMEPATH
38-
PROGRAMDATA
39-
basepython = python3.9
35+
base_python = python3.9
4036
skip_install = true
4137
deps =
4238
pre-commit>=2
39+
pass_env =
40+
HOMEPATH
41+
PROGRAMDATA
4342
commands =
4443
pre-commit run --all-files --show-diff-on-failure
4544
python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")'
4645

47-
[testenv:path]
48-
description = verify build can run from source (bootstrap)
49-
setenv =
50-
PYTHONPATH = {toxinidir}/src
51-
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
52-
commands_pre =
53-
python -E -m pip uninstall -y build colorama
54-
5546
[testenv:type]
5647
description = run type check on code base
57-
extras = typing
58-
setenv =
48+
extras =
49+
typing
50+
set_env =
5951
PYTHONWARNDEFAULTENCODING =
6052
commands =
6153
mypy
6254

63-
[testenv:{py312, py311, py310, py39, py38, py37, pypy37, pypy38, pypy39}-min]
64-
description = check minimum versions required of all dependencies
65-
skip_install = true
66-
commands_pre =
67-
pip install .[test] -c tests/constraints.txt
68-
6955
[testenv:docs]
7056
description = build documentations
71-
basepython = python3.10
57+
base_python = python3.10
7258
extras =
7359
docs
7460
commands =
7561
sphinx-build -n docs {envtmpdir} {posargs:-W}
7662
python -c 'print("Documentation available under file://{envtmpdir}/index.html")'
7763

64+
[testenv:path]
65+
description = verify build can run from source (bootstrap)
66+
set_env =
67+
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
68+
PYTHONPATH = {toxinidir}/src
69+
commands_pre =
70+
python -E -m pip uninstall -y build colorama
71+
72+
[testenv:{py312, py311, py310, py39, py38, py37, pypy37, pypy38, pypy39}-min]
73+
description = check minimum versions required of all dependencies
74+
skip_install = true
75+
commands_pre =
76+
pip install .[test] -c tests/constraints.txt
77+
7878
[testenv:dev]
7979
description = generate a DEV environment
80-
usedevelop = true
80+
package = editable
8181
deps =
8282
virtualenv>=20.0.34
8383
extras =
@@ -89,18 +89,20 @@ commands =
8989

9090
[testenv:coverage]
9191
description = combine coverage from test environments
92-
passenv =
93-
DIFF_AGAINST
94-
setenv =
9592
skip_install = true
9693
deps =
9794
coverage[toml]>=5.1
9895
diff_cover>=3
9996
parallel_show_output = true
97+
pass_env =
98+
DIFF_AGAINST
99+
set_env =
100100
commands =
101101
coverage combine {toxworkdir}
102102
coverage report --skip-covered --show-missing -i
103103
coverage xml -o {toxworkdir}/coverage.xml -i
104104
coverage html -d {toxworkdir}/htmlcov -i
105105
python -m diff_cover.diff_cover_tool --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
106-
depends = {py312, py311, py310, py39, py38, py37, pypy37, pypy38, pypy39}{,-min}, path
106+
depends =
107+
path
108+
{py312, py311, py310, py39, py38, py37, pypy39, pypy38, pypy37}{, -min}

0 commit comments

Comments
 (0)