From 395c1697c86df6eea902fb34dd9da7b98d5d5048 Mon Sep 17 00:00:00 2001 From: jorenham Date: Tue, 15 Oct 2024 09:26:09 +0200 Subject: [PATCH] native tox toml config --- pyproject.toml | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 18cabb17..d43f7765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -327,33 +327,27 @@ line-ending = "lf" quote-style = "single" [tool.tox] -legacy_tox_ini = """ -[tox] isolated_build = true -requires = tox>=4 -envlist = - repo-review - pre-commit - py{311,312,313} - -[testenv] -description = pytest +requires = ["tox>=4.21.2"] +env_list = ["repo-review", "pre-commit", "3.11", "3.12", "3.13"] + +[tool.tox.env_run_base] +description = "test with {base_python}" skip_install = true -allowlist_externals = poetry -commands_pre = poetry install --without debug,docs --sync -commands = poetry run pytest +allowlist_externals = ["poetry"] +commands_pre = [["poetry", "install", "--without=debug,docs"]] +commands = [["poetry", "run", "pytest"]] -[testenv:pre-commit] -description = pre-commit +[tool.tox.env.pre-commit] +description = "pre-commit" skip_install = true -allowlist_externals = poetry -commands_pre = poetry install --without debug,docs --sync -commands = poetry run pre-commit run --all-files +allowlist_externals = ["poetry"] +commands_pre = [["poetry", "install", "--without=debug,docs", "--extras=typing"]] +commands = [["poetry", "run", "pre-commit", "run", "--all-files"]] -[testenv:repo-review] -description = repo-review +[tool.tox.env.repo-review] +description = "repo-review" skip_install = true -allowlist_externals = poetry -commands_pre = poetry install --without debug,docs --sync -commands = poetry run repo-review . -""" +allowlist_externals = ["poetry"] +commands_pre = [["poetry", "install", "--without=debug,docs"]] +commands = [["poetry", "run", "repo-review", "."]]