A second sub-class of SupportFuncProvider which uses its support function
| 814 | |
| 815 | |
| 816 | class 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 | |
| 828 | class SupportFuncUserUnrelated(cmd2.CommandSet): |
no outgoing calls
searching dependent graphs…