Skip to content

[with_annotated] Subparser should be listed as positional arguments by default #1715

Description

@neoniobium

Description

When adding subparsers to a parent parser the subparsers are not listed as positional arguments in the help message of the parent parser. This behavior is different to builtin argparse as well as the Cmd2ArgumentParser.

class App(Cmd):

    @with_annotated(base_command=True)
    def do_base(self, ...) -> None:
        ...
    @with_annotated(subcommand_to="base")
    def do_base_sub(self, ...) -> None:
        ...

Expected Behavior

List subparsers as positional arguments in help message.

Actual Behavior

Subparsers not listed in help message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions