[tox]
env_list =
coverage_erase
py{3.15, 3.14, 3.13, 3.12, 3.11}
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.15, 3.14, 3.13, 3.12, 3.11}: coverage_erase
commands =
coverage run -m pytest tests/unit/ -s
[testenv:coverage_report{,-ci}]
description = Create a coverage report
depends =
py{3.15, 3.14, 3.13, 3.12, 3.11}
dependency_groups =
dev
commands_pre =
- coverage combine
!ci: - coverage html
commands =
coverage report --fail-under={env:COVERAGE_FAIL_UNDER:99}
commands_post =
ci: coverage xml --fail-under={env:COVERAGE_FAIL_UNDER:99}
[testenv:lint]
description = Lint the project
skip_install = true
dependency_groups =
dev
commands =
mypy
isort --profile hug --check --diff isort/ tests/ scripts/
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
ruff format --check
bandit -r isort/
[testenv:docs]
description = Build the documentation
skip_install = true
dependency_groups =
docs
commands =
sphinx-build --nitpicky --fail-on-warning --write-all --fresh-env --builder html docs docs/_build/html