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

Add pre and post task lists into help output #929

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tyzhnenko
Copy link

Example output

❯ inv --help main-task
Usage: inv[oke] [--core-opts] main-task [other tasks here ...]

Docstring:
  none

Options:
  none

Pre-tasks:
  pre-task
  pre-task-2

Post-tasks:
  none

Issue: #860

@@ -804,6 +806,27 @@ def print_task_help(self, name: str) -> None:
print(self.leading_indent + "none")
print("")

print("Pre-tasks:")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of displaying none, can the sections "Pre-tasks" and "Post-tasks" be made optional if the task doesn't define pre- and post- tasks respectively?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antoinebrl sure, on the other hand, other sections have similar behavior with 'none' in the output. Won't it be confusing to have this difference?

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

Successfully merging this pull request may close these issues.

2 participants