MCPcopy Index your code
hub / github.com/ipython/ipython / make_event

Function make_event

tests/test_shortcuts.py:30–38  ·  view source on GitHub ↗
(text, cursor, suggestion)

Source from the content-addressed store, hash-verified

28
29
30def make_event(text, cursor, suggestion):
31 event = Mock()
32 event.current_buffer = Mock()
33 event.current_buffer.suggestion = Mock()
34 event.current_buffer.text = text
35 event.current_buffer.cursor_position = cursor
36 event.current_buffer.suggestion.text = suggestion
37 event.current_buffer.document = Document(text=text, cursor_position=cursor)
38 return event
39
40
41try:

Callers 8

test_acceptFunction · 0.85
test_discardFunction · 0.85
test_autosuggest_at_EOLFunction · 0.85
test_autosuggest_tokenFunction · 0.85
test_accept_characterFunction · 0.85
test_accept_wordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…