-
Notifications
You must be signed in to change notification settings - Fork 23
/
tox.ini
53 lines (39 loc) · 1.71 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
51
52
53
[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 = {py38, py39, py310, py311, py312, pypy38, pypy39, pypy310}-extra_{none, old, new},
lint,
{py38, py39, py310, py311, py312, pypy38, pypy39, pypy310}-bench
[testenv]
deps =
extra_none: -r requirements/test_extra_none.txt
extra_old: -r requirements/test_extra_old.txt
{py38, py39, py310, py311, py312, pypy39, pypy310}-extra_new: -r requirements/test_extra_new.txt
pypy38-extra_new: -r requirements/test_extra_new_pypy38.txt
use_develop = true
commands =
pytest {posargs}
[testenv:{py38, py39, py310, py311, py312, pypy38, pypy39, pypy310}-bench]
deps =
{py38, py39, py310, py311, py312, pypy39, pypy310}: -r requirements/bench.txt
pypy38: -r requirements/bench_pypy38.txt
use_develop = true
commands =
pytest {posargs} benchmarks
[testenv:lint]
deps = -r requirements/lint.txt
base_python = python3.11
install_commands =
python -m pip install -r requirements/pre.txt
python -m 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