(text_before_cursor)
| 91 | _use_simple_prompt = ('IPY_TEST_SIMPLE_PROMPT' in os.environ) or (not _is_tty) |
| 92 | |
| 93 | def black_reformat_handler(text_before_cursor): |
| 94 | import black |
| 95 | formatted_text = black.format_str(text_before_cursor, mode=black.FileMode()) |
| 96 | if not text_before_cursor.endswith('\n') and formatted_text.endswith('\n'): |
| 97 | formatted_text = formatted_text[:-1] |
| 98 | return formatted_text |
| 99 | |
| 100 | |
| 101 | class TerminalInteractiveShell(InteractiveShell): |
nothing calls this directly
no outgoing calls
no test coverage detected