Skip to content

Human readable name not used in parameter error messages #855

@gar1t

Description

@gar1t

I'm getting error messages that look like this:

Usage: guild info [OPTIONS] PACKAGE
Try "guild info --help" for help.

Error: Missing argument "package".

IMO the last line should read Missing argument PACKAGES - "packages" is not reflected in the usage.

I believe the issue is here (and similar patterns in exceptions.py):

https://github.com/pallets/click/blob/master/click/exceptions.py#L121

where self.param.opts short-circuits the use of the human readable name, which would use metavar as expected.

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