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

Function reformat_text_before_cursor

IPython/terminal/shortcuts/__init__.py:392–398  ·  view source on GitHub ↗
(buffer, document, shell)

Source from the content-addressed store, hash-verified

390
391
392def reformat_text_before_cursor(buffer, document, shell):
393 text = buffer.delete_before_cursor(len(document.text[: document.cursor_position]))
394 try:
395 formatted_text = shell.reformat_handler(text)
396 buffer.insert_text(formatted_text)
397 except Exception as e:
398 buffer.insert_text(text)
399
400
401def handle_return_or_newline_or_execute(event):

Callers 2

reformat_and_executeFunction · 0.85
newline_or_executeFunction · 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…