From f5c5bd75459753ddfe31f46698b3cb3f608aa6a3 2021-11-23 19:12:29 From: Matthias Bussonnier Date: 2021-11-23 19:12:29 Subject: [PATCH] Merge pull request #13302 from meeseeksmachine/auto-backport-of-pr-13290-on-7.x Backport PR #13290 on branch 7.x (Use sphinxify (if available) in object_inspect_mime path) --- 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)