Skip to content

env_list and env_base.factors: enable labels for 'Bare range dict' #4046

Description

@nathanwilliams-ct

It might be nice if we could add a label to a 'Bare range dict' e.g.:

factors = [
  { prefix = "3.", start = 12, stop = 14 }, 
  ["django42", "django50"]
]

description = "{factor.0} some text {factor.1}"

might become:

factors = [
  { py_version = { prefix = "3.", start = 12, stop = 14 }}, # not possible: `TypeError: labeled factor group 'py_version' must map to a list, got dict`
  { django_version = ["django42", "django50"]} # currently possible
]

description = "{factor.py_version} some text {factor.django_version}"

or

factors = [
  { prefix = "3.", start = 12, stop = 14, label = "py_version" }, # not possible
  { django_version = ["django42", "django50"]} # currently possible
]

description = "{factor.py_version} some text {factor.django_version}"

https://tox.wiki/en/4.60.1/reference/config.html#toml-env-list-item-shapes
https://tox.wiki/en/4.60.1/reference/config.html#factor-label-substitution

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions