From 7c849c42f334e5070877622800fb4142e4652959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 1 Sep 2023 11:27:15 -0700 Subject: [PATCH] Fix , being used as value parser for env var configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- .pre-commit-config.yaml | 4 +-- docs/changelog/3112.bugfix.rst | 2 ++ docs/config.rst | 45 ++++++++++++++++++++++++-- src/tox/config/cli/env_var.py | 9 ++++-- src/tox/config/main.py | 2 +- src/tox/tox_env/python/pip/req/file.py | 2 +- 6 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 docs/changelog/3112.bugfix.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 20e97dc75e..fc27546b76 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: pyproject-fmt additional_dependencies: ["tox>=4.10"] - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.2" + rev: "v3.0.3" hooks: - id: prettier args: ["--print-width=120", "--prose-wrap=always"] @@ -29,7 +29,7 @@ repos: - id: blacken-docs additional_dependencies: [black==23.7] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.286" + rev: "v0.0.287" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/docs/changelog/3112.bugfix.rst b/docs/changelog/3112.bugfix.rst new file mode 100644 index 0000000000..2b2bda7745 --- /dev/null +++ b/docs/changelog/3112.bugfix.rst @@ -0,0 +1,2 @@ +Allow passing in multiple overrides using the ``;`` character and fix ``,`` being used as splitting values - +by :user:`gaborbernat`. diff --git a/docs/config.rst b/docs/config.rst index 8709877699..cd38dd4c4a 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -1025,12 +1025,51 @@ For example, given this config: You could enable ``ignore_errors`` by running:: - tox --override testenv.ignore_errors=True +.. code-block:: bash + + tox --override testenv.ignore_errors=True You could add additional dependencies by running:: - tox --override testenv.deps+=pytest-xdist,pytest-cov +.. code-block:: bash + + tox --override testenv.deps+=pytest-xdist,pytest-cov You could set additional environment variables by running:: - tox --override testenv.setenv+=baz=quux +.. code-block:: bash + + tox --override testenv.setenv+=baz=quux + +Set CLI flags via environment variables +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +All CLI flags can be set via environment variables too, the naming convention here is ``TOX_