diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 9f7d335..7f18ac2 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -322,6 +322,7 @@ class TerminalInteractiveShell(InteractiveShell): mouse_support=self.mouse_support, enable_open_in_editor=self.extra_open_editor_shortcuts, color_depth=self.color_depth, + tempfile_suffix=".py", **self._extra_prompt_options()) def _make_style_from_name_or_cls(self, name_or_cls): diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py index e44e342..24224d4 100644 --- a/IPython/terminal/shortcuts.py +++ b/IPython/terminal/shortcuts.py @@ -250,7 +250,6 @@ def newline_autoindent_outer(inputsplitter) -> Callable[..., None]: def open_input_in_editor(event): - event.app.current_buffer.tempfile_suffix = ".py" event.app.current_buffer.open_in_editor()