MCPcopy Index your code
hub / github.com/ipython/ipython / object_inspect_mime

Method object_inspect_mime

IPython/core/interactiveshell.py:1921–1945  ·  view source on GitHub ↗

Get object info as a mimebundle of formatted representations. A mimebundle is a dictionary, keyed by mime-type. It must always have the key `'text/plain'`.

(self, oname, detail_level=0, omit_sections=())

Source from the content-addressed store, hash-verified

1919 return self.object_inspect_mime(oname, detail_level)['text/plain']
1920
1921 def object_inspect_mime(self, oname, detail_level=0, omit_sections=()):
1922 """Get object info as a mimebundle of formatted representations.
1923
1924 A mimebundle is a dictionary, keyed by mime-type.
1925 It must always have the key `'text/plain'`.
1926 """
1927 with self.builtin_trap:
1928 info = self._object_find(oname)
1929 if info.found:
1930 if self.sphinxify_docstring:
1931 if sphinxify is None:
1932 raise ImportError("Module ``docrepr`` required but missing")
1933 docformat = sphinxify(self.object_inspect(oname))
1934 else:
1935 docformat = None
1936 return self.inspector._get_info(
1937 info.obj,
1938 oname,
1939 info=info,
1940 detail_level=detail_level,
1941 formatter=docformat,
1942 omit_sections=omit_sections,
1943 )
1944 else:
1945 raise KeyError(oname)
1946
1947 #-------------------------------------------------------------------------
1948 # Things related to history management

Callers 1

object_inspect_textMethod · 0.95

Calls 4

_object_findMethod · 0.95
object_inspectMethod · 0.95
sphinxifyFunction · 0.85
_get_infoMethod · 0.80

Tested by

no test coverage detected