##// END OF EJS Templates
update code to work with black more recent versions
Matthias Bussonnier -
Show More
@@ -269,7 +269,6 b' class TerminalInteractiveShell(InteractiveShell):'
269 self.display_formatter.ipython_display_formatter.enabled = False
269 self.display_formatter.ipython_display_formatter.enabled = False
270
270
271 def init_prompt_toolkit_cli(self):
271 def init_prompt_toolkit_cli(self):
272 self.reformat_handler = lambda x:x
273 if self.simple_prompt:
272 if self.simple_prompt:
274 # Fall back to plain non-interactive output for tests.
273 # Fall back to plain non-interactive output for tests.
275 # This is very limited.
274 # This is very limited.
@@ -129,7 +129,8 b' def newline_or_execute_outer(shell):'
129
129
130 # if all we have after the cursor is whitespace: reformat current text
130 # if all we have after the cursor is whitespace: reformat current text
131 # before cursor
131 # before cursor
132 if d.text[d.cursor_position:].isspace():
132 after_cursor = d.text[d.cursor_position:]
133 if not after_cursor.strip():
133 reformat_text_before_cursor(b, d, shell)
134 reformat_text_before_cursor(b, d, shell)
134 if not (d.on_last_line or
135 if not (d.on_last_line or
135 d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end()
136 d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end()
General Comments 0
You need to be logged in to leave comments. Login now