Skip to content

Argument metavar parameter not used with exception message #273

@rsyring

Description

@rsyring

The Code

@app.command('mssql', short_help='Backup Microsoft SQL database(s).')
@click.argument('backup_type', metavar='type')
def mssql(backup_type):
    click.echo('Running the backup...')

Expected Output

(backupdb)rsyring@loftex:~/projects/backup-db-src$ backupdb mssql
Usage: backupdb mssql [OPTIONS] type

Error: Missing argument "type".

Actual Output

Note that the metavar parameter is used in "Usage" but not when notifying the user about the missing argument:

(backupdb)rsyring@loftex:~/projects/backup-db-src$ backupdb mssql
Usage: backupdb mssql [OPTIONS] type

Error: Missing argument "backup_type".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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