MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / SupportFuncUserSubclass1

Class SupportFuncUserSubclass1

tests/test_commandset.py:804–813  ·  view source on GitHub ↗

A sub-class of SupportFuncProvider which uses its support function

Source from the content-addressed store, hash-verified

802
803
804class SupportFuncUserSubclass1(SupportFuncProvider):
805 """A sub-class of SupportFuncProvider which uses its support function"""
806
807 parser = cmd2.Cmd2ArgumentParser()
808 parser.add_argument("state", type=str, completer=SupportFuncProvider.complete_states)
809
810 @cmd2.with_argparser(parser)
811 def do_user_sub1(self, ns: argparse.Namespace) -> None:
812 """User Sub1 Command"""
813 self._cmd.poutput(f"something {ns.state}")
814
815
816class SupportFuncUserSubclass2(SupportFuncProvider):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…