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

Method do_cut

tests/test_commandset.py:405–415  ·  view source on GitHub ↗

Cut something

(self, ns: argparse.Namespace)

Source from the content-addressed store, hash-verified

403
404 @cmd2.with_argparser(cut_parser)
405 def do_cut(self, ns: argparse.Namespace) -> None:
406 """Cut something"""
407 handler = ns.cmd2_subcmd_handler
408 if handler is not None:
409 # Call whatever subcommand function was selected
410 handler(ns)
411 self._cut_called = True
412 else:
413 # No subcommand was provided, so call help
414 self._cmd.pwarning("This command does nothing without sub-parsers registered")
415 self._cmd.do_help("cut")
416
417 stir_parser = cmd2.Cmd2ArgumentParser()
418 stir_subparsers = stir_parser.add_subparsers(title="item", help="what to stir")

Callers

nothing calls this directly

Calls 2

pwarningMethod · 0.80
do_helpMethod · 0.80

Tested by

no test coverage detected