@@ -158,7 +158,7 @@ def cat_decorator(func):
158
158
return cat_decorator
159
159
160
160
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 ]:
162
162
"""
163
163
Called by the argument_list and argparse wrappers to retrieve just the arguments being
164
164
passed to their do_* methods as a list.
@@ -198,7 +198,7 @@ def with_argument_list(*args: List[Callable], preserve_quotes: bool = False) ->
198
198
199
199
def arg_decorator (func : Callable ):
200
200
@functools .wraps (func )
201
- def cmd_wrapper (cmd2_instance , statement : Union [str , Statement ]):
201
+ def cmd_wrapper (cmd2_instance , statement : Union [Statement , str ]):
202
202
parsed_arglist = _get_command_arg_list (statement , preserve_quotes )
203
203
return func (cmd2_instance , parsed_arglist )
204
204
@@ -225,7 +225,7 @@ def with_argparser_and_unknown_args(argparser: argparse.ArgumentParser, preserve
225
225
# noinspection PyProtectedMember
226
226
def arg_decorator (func : Callable ):
227
227
@functools .wraps (func )
228
- def cmd_wrapper (cmd2_instance , statement : Union [str , Statement ]):
228
+ def cmd_wrapper (cmd2_instance , statement : Union [Statement , str ]):
229
229
parsed_arglist = _get_command_arg_list (statement , preserve_quotes )
230
230
231
231
try :
@@ -268,7 +268,7 @@ def with_argparser(argparser: argparse.ArgumentParser,
268
268
# noinspection PyProtectedMember
269
269
def arg_decorator (func : Callable ):
270
270
@functools .wraps (func )
271
- def cmd_wrapper (cmd2_instance , statement : Union [str , Statement ]):
271
+ def cmd_wrapper (cmd2_instance , statement : Union [Statement , str ]):
272
272
273
273
parsed_arglist = _get_command_arg_list (statement , preserve_quotes )
274
274
0 commit comments