Skip to content

Commit f8dc100

Browse files
committed
fixup! feat(config): Allow ranges in envlist
1 parent 3c4a8df commit f8dc100

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/changelog/3502.feature.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add ranges to generative environments such as py3{10-13}. - by :user:`mimre25`
1+
Add support for number ranges in generative environments, more details :ref:`here<generative-environment-list>`. - by :user:`mimre25`

docs/config.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,8 @@ Conditional settings
15541554
Here pip will be always installed as the configuration value is not conditional. black is only used for the ``format``
15551555
environment, while ``pytest`` is only installed for the ``py310`` and ``py39`` environments.
15561556

1557+
.. _generative-environment-list:
1558+
15571559
Generative environment list
15581560
~~~~~~~~~~~~~~~~~~~~~~~~~~~
15591561

@@ -1595,13 +1597,15 @@ This will generate the following tox environments:
15951597
py311-django40-sqlite -> [no description]
15961598
py311-django40-mysql -> [no description]
15971599
1598-
Both enumerations (`{1,2,3}`) and ranges (`{1-3}`) are supported, and can be mixed together:
1600+
Both enumerations (``{1,2,3}``) and numerical ranges (``{1-3}``) are supported, and can be mixed together:
1601+
15991602
.. code-block:: ini
16001603
16011604
[tox]
16021605
env_list = py3{8-10, 11, 13-14}
16031606
16041607
will create the following envs:
1608+
16051609
.. code-block:: shell
16061610
16071611
> tox l
@@ -1613,6 +1617,8 @@ will create the following envs:
16131617
py313 -> [no description]
16141618
py314 -> [no description]
16151619
1620+
Negative ranges will also be expanded (``{3-1}`` -> ``{3,2,1}``), however, open ranges such as ``{1-}``, ``{-2}``, ``{a-}``, and ``{-b}`` will not be expanded.
1621+
16161622

16171623

16181624
Generative section names

0 commit comments

Comments
 (0)