Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
iago1460 opened this issue Nov 29, 2016 · 3 comments · Fixed by #611
Closed

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

iago1460 opened this issue Nov 29, 2016 · 3 comments · Fixed by #611
Milestone

Comments

@iago1460
Copy link

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
@bitprophet bitprophet added this to the 0.12.3 milestone Nov 29, 2016
@bitprophet
Copy link
Member

Nice catch, thanks. Sounds like a bug. Hopefully trivially fixed.

Slightly related to #398 as well, suspect both are fixable in the same spot or nearby spots.

@florisla
Copy link
Contributor

#533 is a duplicate of this issue. 533 has a reference to here, but not the other way around (yet).

@bitprophet
Copy link
Member

Fixed in #611.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants