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

print full help when no command is passed #81

Merged
merged 1 commit into from
Feb 22, 2018

Conversation

dirk-thomas
Copy link
Member

When no command / verb is passed the full help is printed as if the user would have passed --help.

Fixes #74.

The API is backward compatible so that the behavior of existing extensions isn't changes. Extensions implemented in other repositories could be updated in the same way (not to require the verb) if they want to show the full help text in that case.

# in case no verb was passed
self._subparser.print_help()
return 0

# the attribute should always exist
# otherwise argparse should have exited
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this comment is necessary anymore as the attribute existence is checked just above (same everywhere below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed the obsolete comments.

Copy link
Member

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

works for me!

@dirk-thomas dirk-thomas merged commit 72f3576 into master Feb 22, 2018
@dirk-thomas dirk-thomas deleted the help_without_command branch February 22, 2018 22:05
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Feb 22, 2018
esteve pushed a commit to esteve/ros2cli that referenced this pull request Dec 16, 2022
* Use commented typing for variables

* Fix mypy error that __init__ must return None

* Remove trailing commas in __init__ signatures

* Additional casting where needed

* Correct return type of pid getter

* Remove more commas in launch_ros

* Add comment for different variable name
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.

None yet

2 participants