Method
__init__
(
self,
start: str,
options: Sequence[str],
)
Source from the content-addressed store, hash-verified
| 19 | |
| 20 | class ListCompleter(Completer): |
| 21 | def __init__( |
| 22 | self, |
| 23 | start: str, |
| 24 | options: Sequence[str], |
| 25 | ) -> None: |
| 26 | self.start = start |
| 27 | self.options: list[str] = [] |
| 28 | for o in options: |
| 29 | if o.startswith(start): |
| 30 | self.options.append(o) |
| 31 | self.options.sort() |
| 32 | self.pos = -1 |
| 33 | |
| 34 | def cycle(self, forward: bool = True) -> str: |
| 35 | if not self.options: |
Callers
nothing calls this directly
Tested by
no test coverage detected