-
Notifications
You must be signed in to change notification settings - Fork 7
Cleanup help message options parser #35
Copy link
Copy link
Open
Labels
taskActionable tasksActionable tasks
Description
Goal
Add the -help option to the help message printout for consistent single hyphen option style.
Related discussions: AlphaGenes/AlphaPeel#237
Proposed approach
Change the relevant code as follows:
>>> import argparse
>>> parser = argparse.ArgumentParser(add_help=False)
>>> parser.add_argument('-h', '-help', '--help', help='display help message')
_StoreAction(option_strings=['-h', '-help', '--help'], dest='help', nargs=None, const=None, default=None, type=None, choices=None, required=False, help='display help message', metavar=None, deprecated=False)
>>> parser.print_help()
usage: [-h HELP]
options:
-h, -help, --help HELP
display help message
>>> exit()
Scope
InputOutput.py
Done when
PR open by Apr 9th.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
taskActionable tasksActionable tasks