Skip to content

Commit 4c5bfc0

Browse files
committed
Fixed example code
1 parent 967a8ba commit 4c5bfc0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/help_categories.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import cmd2
1111
from cmd2 import (
1212
COMMAND_NAME,
13+
argparse_custom,
1314
)
1415

1516

@@ -55,7 +56,9 @@ def do_deploy(self, _):
5556
"""Deploy command"""
5657
self.poutput('Deploy')
5758

58-
start_parser = cmd2.DEFAULT_ARGUMENT_PARSER(description='Start', epilog='my_decorator runs even with argparse errors')
59+
start_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER(
60+
description='Start', epilog='my_decorator runs even with argparse errors'
61+
)
5962
start_parser.add_argument('when', choices=START_TIMES, help='Specify when to start')
6063

6164
@my_decorator
@@ -72,7 +75,7 @@ def do_redeploy(self, _):
7275
"""Redeploy command"""
7376
self.poutput('Redeploy')
7477

75-
restart_parser = cmd2.DEFAULT_ARGUMENT_PARSER(
78+
restart_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER(
7679
description='Restart', epilog='my_decorator does not run when argparse errors'
7780
)
7881
restart_parser.add_argument('when', choices=START_TIMES, help='Specify when to restart')

0 commit comments

Comments
 (0)