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

Class LoadablePastaStir

tests/test_commandset.py:487–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485
486
487class LoadablePastaStir(cmd2.CommandSet):
488 def __init__(self, dummy) -> None:
489 super().__init__()
490 self._dummy = dummy # prevents autoload
491
492 stir_pasta_vigor_parser = cmd2.Cmd2ArgumentParser()
493 stir_pasta_vigor_parser.add_argument("frequency")
494
495 @cmd2.as_subcommand_to("stir pasta", "vigorously", stir_pasta_vigor_parser)
496 def stir_pasta_vigorously(self, ns: argparse.Namespace) -> None:
497 self._cmd.poutput("stir the pasta vigorously")
498
499
500class LoadableVegetables(cmd2.CommandSet):

Callers 1

test_nested_subcommandsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_nested_subcommandsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…