MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / _build_set_parser

Method _build_set_parser

cmd2/cmd2.py:4662–4673  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

4660
4661 @classmethod
4662 def _build_set_parser(cls) -> Cmd2ArgumentParser:
4663 # Create the parser for the set command
4664 set_parser = cls._build_base_set_parser()
4665 set_parser.add_argument(
4666 "value",
4667 nargs=argparse.OPTIONAL,
4668 help="new value for settable",
4669 completer=cls.complete_set_value,
4670 suppress_tab_hint=True,
4671 )
4672
4673 return set_parser
4674
4675 # Preserve quotes so users can pass in quoted empty strings and flags (e.g. -h) as the value
4676 @with_argparser(_build_set_parser, preserve_quotes=True)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected