File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ prompt is displayed.
6464 before calling it like the previous functions did.
6565 - Removed ` Cmd.default_to_shell ` .
6666 - Removed ` Cmd.ruler ` since ` cmd2 ` no longer uses it.
67- - All parsers used with ` cmd2 ` commands much be an instance of ` Cmd2ArgumentParser ` or a child
67+ - All parsers used with ` cmd2 ` commands must be an instance of ` Cmd2ArgumentParser ` or a child
6868 class of it.
6969 - Removed ` set_ap_completer_type() ` and ` get_ap_completer_type() ` since ` ap_completer_type ` is
7070 now a public member of ` Cmd2ArgumentParser ` .
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ def with_argparser(
226226) -> Callable [[ArgparseCommandFunc [CmdOrSet ]], RawCommandFuncOptionalBoolReturn [CmdOrSet ]]:
227227 """Decorate a ``do_*`` method to populate its ``args`` argument with the given instance of Cmd2ArgumentParser.
228228
229- :param parser: instance of Cmd2ArgumentParser or a callable that returns an Cmd2ArgumentParser for this command
229+ :param parser: instance of Cmd2ArgumentParser or a callable that returns a Cmd2ArgumentParser for this command
230230 :param ns_provider: An optional function that accepts a cmd2.Cmd or cmd2.CommandSet object as an argument and returns an
231231 argparse.Namespace. This is useful if the Namespace needs to be prepopulated with state data that
232232 affects parsing.
@@ -362,7 +362,7 @@ def as_subcommand_to(
362362
363363 :param command: Command Name. Space-delimited subcommands may optionally be specified
364364 :param subcommand: Subcommand name
365- :param parser: instance of Cmd2ArgumentParser or a callable that returns an Cmd2ArgumentParser for this subcommand
365+ :param parser: instance of Cmd2ArgumentParser or a callable that returns a Cmd2ArgumentParser for this subcommand
366366 :param help: Help message for this subcommand which displays in the list of subcommands of the command we are adding to.
367367 This is passed as the help argument to subparsers.add_parser().
368368 :param aliases: Alternative names for this subcommand. This is passed as the alias argument to
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ leveraging other `cmd2` features. The three ideas here will get you started. Bro
99For all but the simplest of commands, it's probably easier to use
1010[ argparse] ( https://docs.python.org/3/library/argparse.html ) to parse user input than to do it
1111manually yourself for each command. ` cmd2 ` provides a ` @with_argparser() ` decorator which associates
12- an ` Cmd2ArgumentParser ` object with one of your commands. Using this method will:
12+ a ` Cmd2ArgumentParser ` object with one of your commands. Using this method will:
1313
14141 . Pass your command a
1515 [ Namespace] ( https://docs.python.org/3/library/argparse.html#argparse.Namespace ) containing the
You can’t perform that action at this time.
0 commit comments