Skip to content

Invalid tox.toml prevents invocation of --help #3819

@stephenfin

Description

@stephenfin

Issue

(note: This is another one to consider very low-priority, like #3649. Once again, I'm reporting so it's written down somewhere)

The following was my first pass at writing a tox.toml file:

[tox]
requires = ["tox>=4"]
env_list = ["lint"]

[env.lint]
deps =
    mypy
    ruff
commands =
    ruff check {posargs}
    mypy src/ci_status

It's clearly invalid. However, running --help (which I don't believe should have anything to do with tox.toml or any tox configuration file) spits out the following error:

❯ tox --help
ROOT: HandledError| TomlTox failed loading /home/stephenfin/Code/foo/tox.toml due to Invalid value (at line 6, column 7)

Using the bash autocomplete provided by my distro package is also broken, as seen below, but I think that is not managed by tox (in-tree at least) and presumably is parsing the output of some other command.

❯ tox -e  
6,
7)
ALL
(at
column
due
failed
HandledError|
/home/stephenfin/Code/foo/tox.toml
Invalid
line
loading
ROOT:
to
TomlTox
value

Environment

Fedora 43

Output of running tox

4.35.0 from /usr/lib/python3.14/site-packages/tox/__init__.py

Minimal example

See above.

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