##// END OF EJS Templates
Misc linnter cleanups
Matthias Bussonnier -
Show More
@@ -3604,7 +3604,7 b' class InteractiveShell(SingletonConfigurable):'
3604 # Things related to GUI support and pylab
3604 # Things related to GUI support and pylab
3605 #-------------------------------------------------------------------------
3605 #-------------------------------------------------------------------------
3606
3606
3607 active_eventloop = None
3607 active_eventloop: Optional[str] = None
3608
3608
3609 def enable_gui(self, gui=None):
3609 def enable_gui(self, gui=None):
3610 raise NotImplementedError('Implement enable_gui in a subclass')
3610 raise NotImplementedError('Implement enable_gui in a subclass')
@@ -1,6 +1,5 b''
1 """IPython terminal interface using prompt_toolkit"""
1 """IPython terminal interface using prompt_toolkit"""
2
2
3 import asyncio
4 import os
3 import os
5 import sys
4 import sys
6 from warnings import warn
5 from warnings import warn
@@ -96,7 +95,8 b' def get_default_editor():'
96 if os.name == 'posix':
95 if os.name == 'posix':
97 return 'vi' # the only one guaranteed to be there!
96 return 'vi' # the only one guaranteed to be there!
98 else:
97 else:
99 return 'notepad' # same in Windows!
98 return "notepad" # same in Windows!
99
100
100
101 # conservatively check for tty
101 # conservatively check for tty
102 # overridden streams can result in things like:
102 # overridden streams can result in things like:
@@ -293,7 +293,6 b' class TerminalInteractiveShell(InteractiveShell):'
293
293
294 return self.editing_mode
294 return self.editing_mode
295
295
296
297 @observe('editing_mode')
296 @observe('editing_mode')
298 def _editing_mode(self, change):
297 def _editing_mode(self, change):
299 if self.pt_app:
298 if self.pt_app:
@@ -322,7 +321,6 b' class TerminalInteractiveShell(InteractiveShell):'
322 def refresh_style(self):
321 def refresh_style(self):
323 self._style = self._make_style_from_name_or_cls(self.highlighting_style)
322 self._style = self._make_style_from_name_or_cls(self.highlighting_style)
324
323
325
326 highlighting_style_overrides = Dict(
324 highlighting_style_overrides = Dict(
327 help="Override highlighting format for specific tokens"
325 help="Override highlighting format for specific tokens"
328 ).tag(config=True)
326 ).tag(config=True)
@@ -859,7 +857,6 b' class TerminalInteractiveShell(InteractiveShell):'
859 for cmd in ('clear', 'more', 'less', 'man'):
857 for cmd in ('clear', 'more', 'less', 'man'):
860 self.alias_manager.soft_define_alias(cmd, cmd)
858 self.alias_manager.soft_define_alias(cmd, cmd)
861
859
862
863 def __init__(self, *args, **kwargs) -> None:
860 def __init__(self, *args, **kwargs) -> None:
864 super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
861 super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
865 self._set_autosuggestions(self.autosuggestions_provider)
862 self._set_autosuggestions(self.autosuggestions_provider)
@@ -868,7 +865,6 b' class TerminalInteractiveShell(InteractiveShell):'
868 self.keep_running = True
865 self.keep_running = True
869 self._set_formatter(self.autoformatter)
866 self._set_formatter(self.autoformatter)
870
867
871
872 def ask_exit(self):
868 def ask_exit(self):
873 self.keep_running = False
869 self.keep_running = False
874
870
@@ -916,7 +912,6 b' class TerminalInteractiveShell(InteractiveShell):'
916
912
917 self._atexit_once()
913 self._atexit_once()
918
914
919
920 _inputhook = None
915 _inputhook = None
921 def inputhook(self, context):
916 def inputhook(self, context):
922 if self._inputhook is not None:
917 if self._inputhook is not None:
General Comments 0
You need to be logged in to leave comments. Login now