diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 0c796b7..998c64b 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -1287,11 +1287,12 @@ class InteractiveShell(Configurable, Magic): return 'not found' # so callers can take other action def object_inspect(self, oname): - info = self._object_find(oname) - if info.found: - return self.inspector.info(info.obj, oname, info=info) - else: - return oinspect.object_info(name=oname, found=False) + with self.builtin_trap: + info = self._object_find(oname) + if info.found: + return self.inspector.info(info.obj, oname, info=info) + else: + return oinspect.object_info(name=oname, found=False) #------------------------------------------------------------------------- # Things related to history management diff --git a/IPython/frontend/qt/console/frontend_widget.py b/IPython/frontend/qt/console/frontend_widget.py index 26f1ad7..affdd22 100644 --- a/IPython/frontend/qt/console/frontend_widget.py +++ b/IPython/frontend/qt/console/frontend_widget.py @@ -355,7 +355,13 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): # line as string, later we can pass False to format_call and # syntax-highlight it ourselves for nicer formatting in the # calltip. - call_info, doc = call_tip(rep['content'], format_call=True) + if rep['content']['ismagic']: + # Don't generate a call-tip for magics. Ideally, we should + # generate a tooltip, but not on ( like we do for actual + # callables. + call_info, doc = None, None + else: + call_info, doc = call_tip(rep['content'], format_call=True) if call_info or doc: self._call_tip_widget.show_call_info(call_info, doc)