diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-09-03 13:10:33 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-09-03 13:14:29 -0400 |
commit | 4058325487372d2906e9ab5790a373d747a13820 (patch) | |
tree | 4764f5ea86ed32fa70869e0949e07bfd98261932 | |
parent | c3f44b49380a5e8a6423abdc16050ae9d30cb387 (diff) | |
download | cmd2-git-complete_flag_names.tar.gz |
Fixed example codecomplete_flag_names
-rwxr-xr-x | examples/help_categories.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/help_categories.py b/examples/help_categories.py index c5c9af86..b2a1623f 100755 --- a/examples/help_categories.py +++ b/examples/help_categories.py @@ -10,6 +10,7 @@ import functools import cmd2 from cmd2 import ( COMMAND_NAME, + argparse_custom, ) @@ -55,7 +56,9 @@ class HelpCategories(cmd2.Cmd): """Deploy command""" self.poutput('Deploy') - start_parser = cmd2.DEFAULT_ARGUMENT_PARSER(description='Start', epilog='my_decorator runs even with argparse errors') + start_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER( + description='Start', epilog='my_decorator runs even with argparse errors' + ) start_parser.add_argument('when', choices=START_TIMES, help='Specify when to start') @my_decorator @@ -72,7 +75,7 @@ class HelpCategories(cmd2.Cmd): """Redeploy command""" self.poutput('Redeploy') - restart_parser = cmd2.DEFAULT_ARGUMENT_PARSER( + restart_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER( description='Restart', epilog='my_decorator does not run when argparse errors' ) restart_parser.add_argument('when', choices=START_TIMES, help='Specify when to restart') |