Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions ads/common/ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@ def configure_plotting():

try:
import IPython

shell = IPython.get_ipython()
global orig_ipython_traceback
if IPython.core.interactiveshell.InteractiveShell.showtraceback != _log_traceback:
orig_ipython_traceback = (
IPython.core.interactiveshell.InteractiveShell.showtraceback
)
if shell.showtraceback != _log_traceback:
orig_ipython_traceback = shell.showtraceback

# Override the default showtraceback behavior of ipython, to show only the error message and log the stacktrace
IPython.core.interactiveshell.InteractiveShell.showtraceback = _log_traceback
shell.showtraceback = _log_traceback
except ModuleNotFoundError:
pass
2 changes: 1 addition & 1 deletion ads/common/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def show_in_notebook(self):
"display.precision",
4,
):
from IPython.core.display import HTML, display
from IPython.display import HTML, display

display(HTML(info_df.to_html(index=False, header=False)))
return info
Expand Down
Loading