MCPcopy Index your code
hub / github.com/RustPython/RustPython / do

Method do

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

Source from the content-addressed store, hash-verified

205
206class self_insert(commands.self_insert):
207 def do(self) -> None:
208 r: CompletingReader
209 r = self.reader # type: ignore[assignment]
210
211 commands.self_insert.do(self)
212 if r.cmpltn_menu_visible:
213 stem = r.get_stem()
214 if len(stem) < 1:
215 r.cmpltn_reset()
216 else:
217 completions = [w for w in r.cmpltn_menu_choices
218 if w.startswith(stem)]
219 if completions:
220 r.cmpltn_menu, r.cmpltn_menu_end = build_menu(
221 r.console, completions, 0,
222 r.use_brackets, r.sort_in_column)
223 else:
224 r.cmpltn_reset()
225
226
227@dataclass

Callers

nothing calls this directly

Calls 6

lenFunction · 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