From c1e269adf20e70194c380a6f68b3b5a80192ba66 2018-05-17 01:30:31 From: Matthias Bussonnier Date: 2018-05-17 01:30:31 Subject: [PATCH] Merge pull request #11128 from Carreau/non-callable-module Traceback printing change `in ()` to `in `. --- diff --git a/IPython/core/tests/test_iplib.py b/IPython/core/tests/test_iplib.py index f8101e6..b5305d4 100644 --- a/IPython/core/tests/test_iplib.py +++ b/IPython/core/tests/test_iplib.py @@ -72,7 +72,7 @@ In [4]: run simpleerr.py --------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) -... in () +... in 30 mode = 'div' 31 ---> 32 bar(mode) @@ -104,7 +104,7 @@ In [6]: run simpleerr.py --------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) -... in () +... in 30 mode = 'div' 31 ---> 32 bar(mode) @@ -161,7 +161,7 @@ In [22]: %tb --------------------------------------------------------------------------- SystemExit Traceback (most recent call last) -...() +... 30 mode = 'div' 31 ---> 32 bar(mode) @@ -189,7 +189,7 @@ In [24]: %tb --------------------------------------------------------------------------- SystemExit Traceback (most recent call last) -... in () +... in 30 mode = 'div' 31 ---> 32 bar(mode) diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 3c799d0..a93e5a6 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -872,6 +872,8 @@ class VerboseTB(TBTools): if func == '?': call = '' + elif func == '': + call = tpl_call % (func, '') else: # Decide whether to include variable details or not var_repr = eqrepr if self.include_vars else nullrepr diff --git a/IPython/lib/lexers.py b/IPython/lib/lexers.py index 9075f08..b8dec7e 100644 --- a/IPython/lib/lexers.py +++ b/IPython/lib/lexers.py @@ -236,7 +236,7 @@ class IPythonConsoleLexer(Lexer): --------------------------------------------------------------------------- Exception Traceback (most recent call last) - in () + in ----> 1 raise Exception Exception: diff --git a/docs/source/interactive/reference.rst b/docs/source/interactive/reference.rst index ea36556..63ac4c5 100644 --- a/docs/source/interactive/reference.rst +++ b/docs/source/interactive/reference.rst @@ -765,7 +765,7 @@ context line to show. This allows to a many line of context on shallow stack tra In[6]: foo(1) # ... ipdb> where 8 - (1)() + (1) ----> 1 foo(1) (5)foo() @@ -794,7 +794,7 @@ And less context on shallower Stack Trace: .. code:: ipdb> where 1 - (1)() + (1) ----> 1 foo(7) (5)foo()