CLI Parser: Drop epilog message for Sphinx help #3653
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was reported in #3585 that the online documentation page for the CLI is showing this message at the bottom of the page:
That message is the
.epilogproperty of theIniConfigclass intox.config.cli.ini.TBH I don't really understand the point of the message. Most users will never need or have a Tox user config file, preferring that all of their configuration come from project-local configs. And that's fine, or at least it seems like it should be. But that message is always there at the end of the CLI help output. And it completely ignores the local configuration, focusing exclusively on the (wholly unnecessary) user config file.
(For example...)
Regardless, we definitely don't want that message displayed when Sphinx is formatting the parser help for inclusion in the HTML documentation. So, just brute-force set it to
Nonebefore returning it to Sphinx:When calling
tox.config.cli.parse._get_parser_doc()from the Sphinx documentation build, reset the.epilogproperty on the returned parser object. This ensures the help will be formatted without any messages about configuration files.Fixes #3585
tox -e fix)docs/changelogfolder