diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 946eaad..6bb2aa6 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -1812,8 +1812,13 @@ class InteractiveShell(SingletonConfigurable): with self.builtin_trap: info = self._object_find(oname) if info.found: - return self.inspector._get_info(info.obj, oname, info=info, - detail_level=detail_level + docformat = sphinxify if self.sphinxify_docstring else None + return self.inspector._get_info( + info.obj, + oname, + info=info, + detail_level=detail_level, + formatter=docformat, ) else: raise KeyError(oname)