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

Class SupportFuncUserSubclass2

tests/test_commandset.py:816–825  ·  view source on GitHub ↗

A second sub-class of SupportFuncProvider which uses its support function

Source from the content-addressed store, hash-verified

814
815
816class SupportFuncUserSubclass2(SupportFuncProvider):
817 """A second sub-class of SupportFuncProvider which uses its support function"""
818
819 parser = cmd2.Cmd2ArgumentParser()
820 parser.add_argument("state", type=str, completer=SupportFuncProvider.complete_states)
821
822 @cmd2.with_argparser(parser)
823 def do_user_sub2(self, ns: argparse.Namespace) -> None:
824 """User sub2 Command"""
825 self._cmd.poutput(f"something {ns.state}")
826
827
828class SupportFuncUserUnrelated(cmd2.CommandSet):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…