##// END OF EJS Templates
fix issue 337 with incorrect calltips being generated for magics
David Warde-Farley -
Show More
@@ -1287,11 +1287,12 b' class InteractiveShell(Configurable, Magic):'
1287 return 'not found' # so callers can take other action
1287 return 'not found' # so callers can take other action
1288
1288
1289 def object_inspect(self, oname):
1289 def object_inspect(self, oname):
1290 info = self._object_find(oname)
1290 with self.builtin_trap:
1291 if info.found:
1291 info = self._object_find(oname)
1292 return self.inspector.info(info.obj, oname, info=info)
1292 if info.found:
1293 else:
1293 return self.inspector.info(info.obj, oname, info=info)
1294 return oinspect.object_info(name=oname, found=False)
1294 else:
1295 return oinspect.object_info(name=oname, found=False)
1295
1296
1296 #-------------------------------------------------------------------------
1297 #-------------------------------------------------------------------------
1297 # Things related to history management
1298 # Things related to history management
@@ -355,7 +355,13 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):'
355 # line as string, later we can pass False to format_call and
355 # line as string, later we can pass False to format_call and
356 # syntax-highlight it ourselves for nicer formatting in the
356 # syntax-highlight it ourselves for nicer formatting in the
357 # calltip.
357 # calltip.
358 call_info, doc = call_tip(rep['content'], format_call=True)
358 if rep['content']['ismagic']:
359 # Don't generate a call-tip for magics. Ideally, we should
360 # generate a tooltip, but not on ( like we do for actual
361 # callables.
362 call_info, doc = None, None
363 else:
364 call_info, doc = call_tip(rep['content'], format_call=True)
359 if call_info or doc:
365 if call_info or doc:
360 self._call_tip_widget.show_call_info(call_info, doc)
366 self._call_tip_widget.show_call_info(call_info, doc)
361
367
General Comments 0
You need to be logged in to leave comments. Login now