cli: changed help message (-h) to start with capital letter (#2591)

* cli: -h message now starts with capital letter
Fixes #1064

* Added explicit clarification for purposes of adding code
This commit is contained in:
Kirill Malev
2019-10-15 14:32:14 +03:00
committed by Ruslan Kuprieiev
parent f4739b60ae
commit 7c65fd8831
+13
View File
@@ -144,6 +144,19 @@ def parse_args(argv=None):
description=desc,
parents=[parent_parser],
formatter_class=argparse.RawTextHelpFormatter,
add_help=False,
)
# NOTE: We are doing this to capitalize help message.
# Unfortunately, there is no easier and clearer way to do it,
# as adding this argument in get_parent_parser() either in
# log_level_group or on parent_parser itself will cause unexpected error.
parser.add_argument(
"-h",
"--help",
action="help",
default=argparse.SUPPRESS,
help="Show this help message and exit.",
)
# NOTE: On some python versions action='version' prints to stderr