Skip to content

"Missing argument" message uses arg name, not metavar #704

@andy-maier

Description

@andy-maier

If one defines the metavar different from the argument name, like in:

@adapter_group.command('list')
@click.argument('CPC-NAME', type=str, metavar='CPC')
@click.pass_obj
def adapter_list(cmd_obj, cpc_name):

the usage line in the help text correctly uses the metavar:

Usage: zhmc adapter list [OPTIONS] CPC

but the error message when invoked without arguments incorrectly uses the argument name:

Error: Missing argument "CPC-NAME".

I suggest that the metavar is used consistently in all display to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions