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

Class HasReprMime

tests/test_formatters.py:498–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496
497def test_repr_mime():
498 class HasReprMime(object):
499 def _repr_mimebundle_(self, include=None, exclude=None):
500 return {
501 "application/json+test.v2": {"x": "y"},
502 "plain/text": "<HasReprMime>",
503 "image/png": "i-overwrite",
504 }
505
506 def _repr_png_(self):
507 return "should-be-overwritten"
508
509 def _repr_html_(self):
510 return "<b>hi!</b>"
511
512 f = get_ipython().display_formatter
513 html_f = f.formatters["text/html"]

Callers 1

test_repr_mimeFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_repr_mimeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…