Skip to content

help text doesn't work properly in parameters with underscore #409

Closed
@iago1460

Description

@iago1460

The next code doesn't generate a help text:

@task(help={'include_author': 'Include author in the footer'})
def docs(ctx, include_author=False):
    """
    Docs generator
    """
    print("Documenting...")
$ inv --help docs
Usage: inv[oke] [--core-opts] docs [--options] [other tasks here ...]

Docstring:
  Docs generator

Options:
  -i, --include-author

But replacing the key "include_author" with "include-author" in the help dictionary works:

$ inv --help docs
Usage: inv[oke] [--core-opts] docs [--options] [other tasks here ...]

Docstring:
  Docs generator

Options:
  -i, --include-author   Include author in the footer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions