Skip to content

Error message "Could not determine name for option" is not descriptive #2452

Closed
@jaseg

Description

@jaseg

The error message "Could not determine name for option" from core.py does not tell the use which @click.option was at fault. The stacktrace points to the command wrapper itself, not to the decorator since the error is only thrown later.

An example for an invalid option is @click.option('--foo,--bar')

The error message should include the offending declaration.

MR incoming.

Environment:

  • Python version: 3.10
  • Click version: 8.1.3

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