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

Verbose help message on objects when possible: No flags and --help flag consistent behavior #504

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ESPR3SS0
Copy link

Issue:
Fixes #438

Given an object that has no init method, or the init method takes no arguments besides self passing a '--help' flag results in a less verbose help message than if no flag was passed at all.

Cause:

  • When --help flag is provided, an object is not instantiated so the help message is less verbose
  • When no flag is provided, and the class requires no arguments, an object is instantiated so the help message is more verbose

Fix:
A check to see if the object contains an init method, and whether or not the init method requires arguments fixes this. If no arguments are required, instantiate an object then show the help message.

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.

Inconsistent behaviour between --help and no arguments
1 participant