-
Notifications
You must be signed in to change notification settings - Fork 23
/
tox.ini
50 lines (37 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
45
46
47
48
49
50
[vars]
# Do not forget to update paths at .pre-commit-config.yaml
lint_mypy = src/ scripts/ examples/ benchmarks/benchmarks/pybench/ docs/examples/ docs/custom_ext/
lint_all = src/ scripts/ examples/ benchmarks/benchmarks/pybench/ docs/examples/ docs/custom_ext/ tests/
[tox]
env_list = {py39, py310, py311, py312, pypy39, pypy310}-extra_{none, old, new},
lint,
{py39, py310, py311, py312, pypy39, pypy310}-bench
[testenv]
deps =
extra_none: -r requirements/test_extra_none.txt
extra_old: -r requirements/test_extra_old.txt
extra_new: -r requirements/test_extra_new.txt
use_develop = true
commands =
pytest {posargs}
[testenv:{py39, py310, py311, py312, pypy39, pypy310}-bench]
deps =
-r requirements/bench.txt
use_develop = true
commands =
pytest {posargs} benchmarks
[testenv:lint]
deps = -r requirements/lint.txt
base_python = python3.11
install_commands =
python -m uv pip install -r requirements/pre.txt
python -m uv pip install {opts} {packages}
ignore_errors = true
allowlist_externals = ruff
commands =
ruff check {[vars]lint_all} --fix
mypy {[vars]lint_mypy}
pre-commit run --all-files
python scripts/astpath_lint.py {[vars]lint_all}
# vulture {[vars]lint_all} # currently it creates too many false-positive alerts
# TODO: add more linters