Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
65 lines (54 loc) · 1.52 KB
/
Copy pathtox.ini
File metadata and controls
65 lines (54 loc) · 1.52 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
[tox]
envlist = py{310,311,312,313,314}, coverage, style
skip_missing_interpreters = true
[testenv]
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
usedevelop = True
dependency_groups = test
commands = pytest {posargs:-vv --cov=src/ --cov=tests/ --cov-report=xml tests/}
[testenv:coverage]
setenv = COVERAGE_FILE={toxworkdir}/.coverage
skip_install = True
deps = coverage
commands = coverage combine
coverage report -m
coverage xml
coverage html
[testenv:style]
skip_install = True
deps = ruff
commands = ruff check
ruff format --diff
[testenv:reformat]
skip_install = True
deps = ruff
commands = ruff check --fix
ruff format
# Type checkers
# types-PyYAML: yaml has no inline type hints (mypy and zuban insist on stubs, the others use them when present)
[testenv:basedpyright]
deps = basedpyright
types-PyYAML
# Without --pythonpath, basedpyright resolves imports against ./.venv rather than this tox env
commands = basedpyright --pythonpath {envpython} {posargs}
[testenv:mypy]
deps = mypy
types-PyYAML
commands = mypy {posargs}
[testenv:pyrefly]
deps = pyrefly
types-PyYAML
commands = pyrefly check {posargs}
[testenv:pyright]
deps = pyright
types-PyYAML
commands = pyright {posargs}
[testenv:ty]
deps = ty
types-PyYAML
commands = ty check {posargs}
[testenv:zuban]
deps = zuban
types-PyYAML
# Without --python-executable, zuban doesn't resolve imports against this tox env
commands = zuban check --python-executable {envpython} {posargs}