MCPcopy
hub / github.com/mitmproxy/mitmproxy / __init__

Method __init__

mitmproxy/tools/console/commander/commander.py:21–32  ·  view source on GitHub ↗
(
        self,
        start: str,
        options: Sequence[str],
    )

Source from the content-addressed store, hash-verified

19
20class 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

Calls 2

sortMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected