From e98fabe3f14019cd0fe9ff409d6f8051b86edbbc Mon Sep 17 00:00:00 2001 From: Steve Brudenell Date: Mon, 24 Jun 2024 14:42:18 -0800 Subject: [PATCH] switch to legacy_tox_ini, remove tox-ini-fmt. I noticed https://github.com/tox-dev/tox-ini-fmt/issues/42, which makes it hard to use comments in tox.ini. Auto-formatting tox.ini was the main motivation to use a separate tox.ini at all, so just keep everything in pyproject.toml. Maybe tox will eventually have first-party support for pyproject.toml; this will make the transition that much simpler. --- .pre-commit-config.yaml | 4 ---- pyproject.toml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 590fd48..dcb2bc5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,10 +21,6 @@ repos: rev: 2.1.3 hooks: - id: pyproject-fmt -- repo: https://github.com/tox-dev/tox-ini-fmt - rev: 1.3.1 - hooks: - - id: tox-ini-fmt - repo: https://github.com/google/yamlfmt rev: v0.12.1 hooks: diff --git a/pyproject.toml b/pyproject.toml index 0fb0358..33dbb54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,33 @@ lint.isort.force-sort-within-sections = true lint.isort.order-by-type = false lint.pydocstyle.convention = "google" +[tool.tox] +legacy_tox_ini = """ + [tox] + requires = + tox>=4.2 + env_list = + py + + [testenv] + system_site_packages = true + deps = + covdefaults + coverage + moto[s3] + pytest + commands = + coverage erase + coverage run -m pytest {posargs} + coverage report + + [coverage:run] + plugins = covdefaults + source = + btrfs2s3 + tests +""" + [tool.mypy] mypy_path = "typeshed" strict = true