blob: 3919c424583f61450dbcbc8c36de30724829803b [file]
[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.14, 3.13, 3.12, 3.11, 3.10}
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.14, 3.13, 3.12, 3.11, 3.10}: coverage_erase
commands =
coverage run -m pytest tests/unit/ -s
[testenv:coverage_report{,-ci}]
description = Create a coverage report
depends =
py{3.14, 3.13, 3.12, 3.11, 3.10}
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
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/ -x isort/_vendored