CommandSet which provides a support function (complete_states) to other CommandSets
| 787 | |
| 788 | |
| 789 | class SupportFuncProvider(cmd2.CommandSet): |
| 790 | """CommandSet which provides a support function (complete_states) to other CommandSets""" |
| 791 | |
| 792 | DEFAULT_CATEGORY = "With Completer" |
| 793 | states = ("alabama", "alaska", "arizona", "arkansas", "california", "colorado", "connecticut", "delaware") |
| 794 | |
| 795 | def __init__(self, dummy) -> None: |
| 796 | """Dummy variable prevents this from being autoloaded in other tests""" |
| 797 | super().__init__() |
| 798 | |
| 799 | def complete_states(self, text: str, line: str, begidx: int, endidx: int) -> Completions: |
| 800 | assert self is complete_states_expected_self |
| 801 | return self._cmd.basic_complete(text, line, begidx, endidx, self.states) |
| 802 | |
| 803 | |
| 804 | class SupportFuncUserSubclass1(SupportFuncProvider): |
no outgoing calls
searching dependent graphs…