You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot invoke task with underscore in method name #1055
frominvoke.tasksimporttask@taskdefshow_help(c):
"""Show available tasks."""print("Available tasks:")
@taskdefshowhelp(c):
"""Show available tasks."""print("Available tasks:")
Hi @dax-westerman — drive-by triage: I believe this is working as designed.
Invoke ships with tasks.auto_dash_names: True as a default (invoke/config.py), which means a Python task named show_help is exposed on the CLI as show-help (dashes), not show_help (underscores). So:
invoke show-help # works
invoke show_help # not found — this is expected
Probably safe to close. Happy to be corrected if there's a separate bug here I'm missing.
Drive-by triage from an outside contributor (data engineer GCP/Python, jbbqqf). Comment drafted with Claude assistance; evidence and conclusion are mine.
Activity
OttoAndrey commentedon Dec 5, 2025
hi! You can see available tasks/commands by
and maybe you need call it like
jbbqqf commentedon May 24, 2026
Hi @dax-westerman — drive-by triage: I believe this is working as designed.
Invoke ships with
tasks.auto_dash_names: Trueas a default (invoke/config.py), which means a Python task namedshow_helpis exposed on the CLI asshow-help(dashes), notshow_help(underscores). So:The behavior is documented in
sites/docs/concepts/invoking-tasks.rstunder "Dashes vs underscores in flag names", and the toggle is described insites/docs/concepts/namespaces.rst(settasks.auto_dash_names: falseininvoke.yamlto opt out). @OttoAndrey already pointed this out in their reply.Probably safe to close. Happy to be corrected if there's a separate bug here I'm missing.
Drive-by triage from an outside contributor (data engineer GCP/Python, jbbqqf). Comment drafted with Claude assistance; evidence and conclusion are mine.