Skip to content

Commit

Permalink
cleanup impossible code
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Apr 2, 2024
1 parent 49a7652 commit 59673f3
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions IPython/core/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
#
#*****************************************************************************

from __future__ import annotations

import inspect
import linecache
import os
Expand All @@ -112,6 +114,12 @@
from IPython.core.excolors import exception_colors
from IPython.utils import PyColorize, coloransi, py3compat

from typing import TYPE_CHECKING

if TYPE_CHECKING:
# otherwise circular import
from IPython.core.interactiveshell import InteractiveShell

# skip module docstests
__skip_doctest__ = True

Expand Down Expand Up @@ -190,6 +198,8 @@ class Pdb(OldPdb):
"""

shell: InteractiveShell

if CHAIN_EXCEPTIONS:
MAX_CHAINED_EXCEPTION_DEPTH = 999

Expand Down Expand Up @@ -470,24 +480,11 @@ def precmd(self, line):

return line

def new_do_frame(self, arg):
OldPdb.do_frame(self, arg)

def new_do_quit(self, arg):

if hasattr(self, 'old_all_completions'):
self.shell.Completer.all_completions = self.old_all_completions

return OldPdb.do_quit(self, arg)

do_q = do_quit = decorate_fn_with_doc(new_do_quit, OldPdb.do_quit)

def new_do_restart(self, arg):
"""Restart command. In the context of ipython this is exactly the same
thing as 'quit'."""
self.msg("Restart doesn't make sense here. Using 'quit' instead.")
return self.do_quit(arg)

def print_stack_trace(self, context=None):
Colors = self.color_scheme_table.active_colors
ColorsNormal = Colors.Normal
Expand Down

0 comments on commit 59673f3

Please sign in to comment.