@@ -158,7 +158,7 @@ def cat_decorator(func):
158158 return cat_decorator
159159
160160
161- def _get_command_arg_list (to_parse : Union [str , Statement ], preserve_quotes : bool ) -> List [str ]:
161+ def _get_command_arg_list (to_parse : Union [Statement , str ], preserve_quotes : bool ) -> List [str ]:
162162 """
163163 Called by the argument_list and argparse wrappers to retrieve just the arguments being
164164 passed to their do_* methods as a list.
@@ -198,7 +198,7 @@ def with_argument_list(*args: List[Callable], preserve_quotes: bool = False) ->
198198
199199 def arg_decorator (func : Callable ):
200200 @functools .wraps (func )
201- def cmd_wrapper (cmd2_instance , statement : Union [str , Statement ]):
201+ def cmd_wrapper (cmd2_instance , statement : Union [Statement , str ]):
202202 parsed_arglist = _get_command_arg_list (statement , preserve_quotes )
203203 return func (cmd2_instance , parsed_arglist )
204204
@@ -225,7 +225,7 @@ def with_argparser_and_unknown_args(argparser: argparse.ArgumentParser, preserve
225225 # noinspection PyProtectedMember
226226 def arg_decorator (func : Callable ):
227227 @functools .wraps (func )
228- def cmd_wrapper (cmd2_instance , statement : Union [str , Statement ]):
228+ def cmd_wrapper (cmd2_instance , statement : Union [Statement , str ]):
229229 parsed_arglist = _get_command_arg_list (statement , preserve_quotes )
230230
231231 try :
@@ -268,7 +268,7 @@ def with_argparser(argparser: argparse.ArgumentParser,
268268 # noinspection PyProtectedMember
269269 def arg_decorator (func : Callable ):
270270 @functools .wraps (func )
271- def cmd_wrapper (cmd2_instance , statement : Union [str , Statement ]):
271+ def cmd_wrapper (cmd2_instance , statement : Union [Statement , str ]):
272272
273273 parsed_arglist = _get_command_arg_list (statement , preserve_quotes )
274274
0 commit comments