tox-dev / sphinx-argparse-cli

Render CLI arguments (sub-commands friendly) defined by the argparse module.
MIT License
22 stars 9 forks source link

bug: tuple metavar not correctly displayed #177

Open viniciusglinden opened 3 months ago

viniciusglinden commented 3 months ago
    test_selection = parser.add_argument_group("Test selection", "What should the script test")
    mutex_group.add_argument(
        "--test", "-t", metavar=("A", "B"), type=int, nargs=2, help="Select a specific A and B to run"
    )

will display under "Test selection":

--test A, -t A- Select a specific A and B to run (default: None)
viniciusglinden commented 3 months ago

issue probably occurs in this line: https://github.com/tox-dev/sphinx-argparse-cli/blob/main/src/sphinx_argparse_cli/_logic.py#L238