From 7c65fd8831239f94ec3676a1966d5f5a9d8f6fa5 Mon Sep 17 00:00:00 2001 From: Kirill Malev Date: Tue, 15 Oct 2019 14:32:14 +0300 Subject: [PATCH] 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 --- dvc/cli.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dvc/cli.py b/dvc/cli.py index f42f949a0..f1a4f9ef3 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -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