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

Method select_item

Lib/_pyrepl/historical_reader.py:274–283  ·  view source on GitHub ↗
(self, i: int)

Source from the content-addressed store, hash-verified

272 )
273
274 def select_item(self, i: int) -> None:
275 self.transient_history[self.historyi] = self.get_unicode()
276 buf = self.transient_history.get(i)
277 if buf is None:
278 buf = self.history[i].rstrip()
279 self.buffer = list(buf)
280 self.historyi = i
281 self.pos = len(self.buffer)
282 self.dirty = True
283 self.last_refresh_cache.invalidated = True
284
285 def get_item(self, i: int) -> str:
286 if i != len(self.history):

Callers 9

search_nextMethod · 0.95
isearch_nextMethod · 0.95
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45

Calls 5

listClass · 0.85
lenFunction · 0.85
get_unicodeMethod · 0.80
getMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected