MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / complete_foo

Method complete_foo

tests/test_dynamic_complete_style.py:15–18  ·  view source on GitHub ↗
(self, text, line, begidx, endidx)

Source from the content-addressed store, hash-verified

13 pass
14
15 def complete_foo(self, text, line, begidx, endidx) -> Completions:
16 # Return 10 items
17 items = [f"item{i}" for i in range(10) if f"item{i}".startswith(text)]
18 return Completions.from_values(items)
19
20 def do_bar(self, args):
21 pass

Callers

nothing calls this directly

Calls 1

from_valuesMethod · 0.80

Tested by

no test coverage detected