Skip to content

feature request: show a @task's default argument values in help message #1048

@davidxia

Description

@davidxia

Would be great if the help message showed a task's default argument values.

@task
def foo(ctx, a: int = 0, b: str = "b"):
    """My function"""
    print(f"a: {a}, b: {b}")

Right now it doesn't.

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

Docstring:
  My function

Options:
  -a INT
  -b STRING

I can use the @task's help parameter, but it would be nice to show each arg's default value without needing that.

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