Skip to content

Cannot invoke task with underscore in method name #1055

@dax-westerman

Description

@dax-westerman

Version: 2.2.1

Use Case

Using the example tasks.py...

from invoke.tasks import task


@task
def show_help(c):
    """Show available tasks."""
    print("Available tasks:")
    
@task
def showhelp(c):
    """Show available tasks."""
    print("Available tasks:")

Calling showhelp...

invoke showhelp

prints

Available tasks:

however, calling 'show_help`...

invoke show_help

results in

No idea what 'show_help' is!

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