-
-
Notifications
You must be signed in to change notification settings - Fork 598
/
Copy pathtox.ini
65 lines (57 loc) · 1.68 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
54
55
56
57
58
59
60
61
62
63
64
65
[tox]
env_list =
coverage_erase
# When updating the list of Python versions to test,
# use search-and-replace to ensure that intra-environment
# dependencies are maintained for parallel execution.
py{3.13, 3.12, 3.11, 3.10, 3.9}
coverage_report
mypy
[testenv:coverage_erase]
description = Erase coverage files
dependency_groups =
dev
commands =
coverage erase
[testenv]
runner = uv-venv-lock-runner
dependency_groups =
dev
depends =
py{3.13, 3.12, 3.11, 3.10, 3.9}: coverage_erase
commands =
coverage run -m pytest tests/unit/ -s --ignore=tests/unit/test_deprecated_finders.py
[testenv:coverage_report{,-ci}]
description = Create a coverage report
depends =
py{3.13, 3.12, 3.11, 3.10, 3.9}
dependency_groups =
dev
commands_pre =
# `coverage combine` will fail if run twice in a row.
# The '-' ignores failures.
- coverage combine
# Only write an HTML reports when NOT running in CI.
# Also, ignore the exit code if coverage falls below the fail_under value.
!ci: - coverage html
commands =
coverage report
commands_post =
# Only write an XML report when running in CI.
ci: coverage xml
[testenv:lint]
description = Lint the project
skip_install = true
dependency_groups =
dev
commands =
cruft check
mypy -p isort -p tests
black --target-version py39 --check .
isort --profile hug --check --diff isort/ tests/
isort --profile hug --check --diff example_isort_formatting_plugin/
isort --profile hug --check --diff example_isort_sorting_plugin/
isort --profile hug --check --diff example_shared_isort_profile/
flake8 isort/ tests/
ruff check
bandit -r isort/ -x isort/_vendored