##// END OF EJS Templates
cleanup impossible code
Matthias Bussonnier -
Show More
@@ -100,6 +100,8 b' All the changes since then are under the same license as IPython.'
100 #
100 #
101 #*****************************************************************************
101 #*****************************************************************************
102
102
103 from __future__ import annotations
104
103 import inspect
105 import inspect
104 import linecache
106 import linecache
105 import os
107 import os
@@ -112,6 +114,12 b' from IPython import get_ipython'
112 from IPython.core.excolors import exception_colors
114 from IPython.core.excolors import exception_colors
113 from IPython.utils import PyColorize, coloransi, py3compat
115 from IPython.utils import PyColorize, coloransi, py3compat
114
116
117 from typing import TYPE_CHECKING
118
119 if TYPE_CHECKING:
120 # otherwise circular import
121 from IPython.core.interactiveshell import InteractiveShell
122
115 # skip module docstests
123 # skip module docstests
116 __skip_doctest__ = True
124 __skip_doctest__ = True
117
125
@@ -190,6 +198,8 b' class Pdb(OldPdb):'
190
198
191 """
199 """
192
200
201 shell: InteractiveShell
202
193 if CHAIN_EXCEPTIONS:
203 if CHAIN_EXCEPTIONS:
194 MAX_CHAINED_EXCEPTION_DEPTH = 999
204 MAX_CHAINED_EXCEPTION_DEPTH = 999
195
205
@@ -470,24 +480,11 b' class Pdb(OldPdb):'
470
480
471 return line
481 return line
472
482
473 def new_do_frame(self, arg):
474 OldPdb.do_frame(self, arg)
475
476 def new_do_quit(self, arg):
483 def new_do_quit(self, arg):
477
478 if hasattr(self, 'old_all_completions'):
479 self.shell.Completer.all_completions = self.old_all_completions
480
481 return OldPdb.do_quit(self, arg)
484 return OldPdb.do_quit(self, arg)
482
485
483 do_q = do_quit = decorate_fn_with_doc(new_do_quit, OldPdb.do_quit)
486 do_q = do_quit = decorate_fn_with_doc(new_do_quit, OldPdb.do_quit)
484
487
485 def new_do_restart(self, arg):
486 """Restart command. In the context of ipython this is exactly the same
487 thing as 'quit'."""
488 self.msg("Restart doesn't make sense here. Using 'quit' instead.")
489 return self.do_quit(arg)
490
491 def print_stack_trace(self, context=None):
488 def print_stack_trace(self, context=None):
492 Colors = self.color_scheme_table.active_colors
489 Colors = self.color_scheme_table.active_colors
493 ColorsNormal = Colors.Normal
490 ColorsNormal = Colors.Normal
General Comments 0
You need to be logged in to leave comments. Login now