Skip to content

Commit

Permalink
Merge pull request #13 from ronen-y/master
Browse files Browse the repository at this point in the history
add option of autocomplete
  • Loading branch information
gregoil committed Jul 19, 2018
2 parents 0e0f4d6 + 1b0e9c7 commit 72259d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 81 deletions.
11 changes: 6 additions & 5 deletions ipdbugger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@
import colorama
from termcolor import colored
from future.utils import raise_
from IPython.core.debugger import Pdb
from IPython.terminal.debugger import TerminalPdb

# Enable color printing on screen.
colorama.init()


class IPDBugger(Pdb):
class IPDBugger(TerminalPdb):
"""Debugger class, adds functionality to the normal pdb."""

def __init__(self, exc_info, *args, **kwargs):
Pdb.__init__(self, *args, **kwargs)
TerminalPdb.__init__(self, *args, **kwargs)
self.exc_info = exc_info

def do_raise(self, arg):
Expand Down Expand Up @@ -69,7 +70,7 @@ def do_retry(self, arg):

def dispatch_line(self, frame):
"""Handle line action and return the next line callback."""
callback = Pdb.dispatch_line(self, frame)
callback = TerminalPdb.dispatch_line(self, frame)

# If the ipdb session ended, don't return a callback for the next line
if self.stoplineno == -1:
Expand Down Expand Up @@ -206,7 +207,7 @@ def debug(victim, ignore_exceptions=(), catch_exception=None):
# of the whole function
@functools.wraps(victim)
def wrapper(*args, **kw):
victim(*args, **kw)
return victim(*args, **kw)

return wrapper

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Setup file for handling packaging and distribution."""
from setuptools import setup

__version__ = "2.0.2"
__version__ = "2.0.3"

setup(
name="ipdbugger",
Expand Down
74 changes: 0 additions & 74 deletions tests/test_shell.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extras = dev
commands =
flake8 setup.py ipdbugger
pylint setup.py ipdbugger
pytest
pytest -s

[pytest]
testpaths = tests/
Expand Down

0 comments on commit 72259d4

Please sign in to comment.