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

Method do_stir

tests/test_commandset.py:421–434  ·  view source on GitHub ↗

Stir something

(self, ns: argparse.Namespace)

Source from the content-addressed store, hash-verified

419
420 @cmd2.with_argparser(stir_parser, ns_provider=namespace_provider)
421 def do_stir(self, ns: argparse.Namespace) -> None:
422 """Stir something"""
423 if not ns.cut_called:
424 self._cmd.poutput("Need to cut before stirring")
425 return
426
427 handler = ns.cmd2_subcmd_handler
428 if handler is not None:
429 # Call whatever subcommand function was selected
430 handler(ns)
431 else:
432 # No subcommand was provided, so call help
433 self._cmd.pwarning("This command does nothing without sub-parsers registered")
434 self._cmd.do_help("stir")
435
436 stir_pasta_parser = cmd2.Cmd2ArgumentParser()
437 stir_pasta_parser.add_argument("--option", "-o")

Callers

nothing calls this directly

Calls 3

poutputMethod · 0.80
pwarningMethod · 0.80
do_helpMethod · 0.80

Tested by

no test coverage detected