@@ -40,7 +40,7 @@ def do_banana(self, statement: cmd2.Statement):
4040 """Banana Command"""
4141 self ._cmd .poutput ('Banana!!' )
4242
43- cranberry_parser = cmd2 .Cmd2ArgumentParser ('cranberry' )
43+ cranberry_parser = cmd2 .Cmd2ArgumentParser ()
4444 cranberry_parser .add_argument ('arg1' , choices = ['lemonade' , 'juice' , 'sauce' ])
4545
4646 @cmd2 .with_argparser (cranberry_parser , with_unknown_args = True )
@@ -65,7 +65,7 @@ def do_durian(self, args: List[str]):
6565 def complete_durian (self , text : str , line : str , begidx : int , endidx : int ) -> List [str ]:
6666 return utils .basic_complete (text , line , begidx , endidx , ['stinks' , 'smells' , 'disgusting' ])
6767
68- elderberry_parser = cmd2 .Cmd2ArgumentParser ('elderberry' )
68+ elderberry_parser = cmd2 .Cmd2ArgumentParser ()
6969 elderberry_parser .add_argument ('arg1' )
7070
7171 @cmd2 .with_category ('Alone' )
@@ -319,7 +319,7 @@ def __init__(self, dummy):
319319 self ._dummy = dummy # prevents autoload
320320 self ._cut_called = False
321321
322- cut_parser = cmd2 .Cmd2ArgumentParser ('cut' )
322+ cut_parser = cmd2 .Cmd2ArgumentParser ()
323323 cut_subparsers = cut_parser .add_subparsers (title = 'item' , help = 'item to cut' )
324324
325325 def namespace_provider (self ) -> argparse .Namespace :
@@ -340,8 +340,7 @@ def do_cut(self, ns: argparse.Namespace):
340340 self ._cmd .pwarning ('This command does nothing without sub-parsers registered' )
341341 self ._cmd .do_help ('cut' )
342342
343-
344- stir_parser = cmd2 .Cmd2ArgumentParser ('stir' )
343+ stir_parser = cmd2 .Cmd2ArgumentParser ()
345344 stir_subparsers = stir_parser .add_subparsers (title = 'item' , help = 'what to stir' )
346345
347346 @cmd2 .with_argparser (stir_parser , ns_provider = namespace_provider )
@@ -613,7 +612,7 @@ class AppWithSubCommands(cmd2.Cmd):
613612 def __init__ (self , * args , ** kwargs ):
614613 super (AppWithSubCommands , self ).__init__ (* args , ** kwargs )
615614
616- cut_parser = cmd2 .Cmd2ArgumentParser ('cut' )
615+ cut_parser = cmd2 .Cmd2ArgumentParser ()
617616 cut_subparsers = cut_parser .add_subparsers (title = 'item' , help = 'item to cut' )
618617
619618 @cmd2 .with_argparser (cut_parser )
@@ -874,7 +873,7 @@ class BadSubcommandApp(cmd2.Cmd):
874873 def __init__ (self , * args , ** kwargs ):
875874 super (BadSubcommandApp , self ).__init__ (* args , ** kwargs )
876875
877- cut_parser = cmd2 .Cmd2ArgumentParser ('cut' )
876+ cut_parser = cmd2 .Cmd2ArgumentParser ()
878877 cut_subparsers = cut_parser .add_subparsers (title = 'item' , help = 'item to cut' )
879878
880879 @cmd2 .with_argparser (cut_parser )
0 commit comments