-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathtox.ini
More file actions
83 lines (75 loc) · 1.89 KB
/
Copy pathtox.ini
File metadata and controls
83 lines (75 loc) · 1.89 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[tox]
requires =
tox>=4
env_list = lint, format, type, codestyle, 3.10, 3.11, 3.12, 3.13, 3.14
[gh-actions]
python =
3.10: 3.10, type
3.11: 3.11, type
3.12: 3.12, type
3.13: 3.13, type
3.14: 3.14, type
[testenv]
description = run unit tests
deps = pytest
commands = pytest {posargs:tests/cepces_test}
extras = user-submit
[testenv:lint]
description = run linter
changedir = {tox_root}
skip_install = true
deps =
ruff
commands = {envpython} -m ruff check {posargs:{tox_root}}
[testenv:format]
description = run formatter
changedir = {tox_root}
skipsdist = true
skip_install = true
deps = ruff
commands =
{envpython} -m ruff format --check --diff {posargs:{tox_root}}
[testenv:type]
description = run type checks
changedir = {tox_root}
deps =
basedpyright
types-requests
types-pyasn1
pytest # Need pytest installed for type stubs
commands =
{envpython} -m basedpyright {posargs:src tests}
[testenv:codestyle]
description = run ruff style checker
changedir = {tox_root}
skip_install = true
deps = ruff
commands = {envpython} -m ruff check {posargs:{tox_root}}
[testenv:stubgen]
description = regenerate type stubs (uses mypy's stubgen tool)
changedir = {tox_root}
deps =
mypy >= 1.2.0
types-requests
requests-gssapi
gssapi
allowlist_externals =
rm
cp
commands =
rm -rf {envtmpdir}/stubs
{envbindir}/stubgen -p cepces.krb5 -o {envtmpdir}/stubs
{envbindir}/stubgen -p requests_gssapi -o {envtmpdir}/stubs
{envbindir}/stubgen -p gssapi -o {envtmpdir}/stubs
rm -rf stubs/cepces
rm -rf stubs/requests_gssapi
rm -rf stubs/gssapi
cp -r {envtmpdir}/stubs/cepces stubs/
cp -r {envtmpdir}/stubs/requests_gssapi stubs/
cp -r {envtmpdir}/stubs/gssapi stubs/
[testenv:distcheck]
description = check version consistency across files
changedir = {tox_root}
skip_install = true
commands =
{envpython} scripts/check_version.py