MCPcopy Index your code
hub / github.com/python/cpython / do

Method do

Lib/_pyrepl/completing_reader.py:230–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

228
229class self_insert(commands.self_insert):
230 def do(self) -> None:
231 r: CompletingReader
232 r = self.reader # type: ignore[assignment]
233
234 commands.self_insert.do(self)
235 if r.cmpltn_menu_visible:
236 stem = r.get_stem()
237 if len(stem) < 1:
238 r.cmpltn_reset()
239 else:
240 completions = [w for w in r.cmpltn_menu_choices
241 if stripcolor(w).startswith(stem)]
242 if completions:
243 r.cmpltn_menu, r.cmpltn_menu_end = build_menu(
244 r.console, completions, 0,
245 r.use_brackets, r.sort_in_column)
246 else:
247 r.cmpltn_reset()
248
249
250@dataclass

Callers

nothing calls this directly

Calls 6

stripcolorFunction · 0.85
build_menuFunction · 0.85
cmpltn_resetMethod · 0.80
doMethod · 0.45
get_stemMethod · 0.45
startswithMethod · 0.45

Tested by

no test coverage detected