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=())
| 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 |
no test coverage detected