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

Class HTMLFormatter

IPython/core/formatters.py:775–789  ·  view source on GitHub ↗

An HTML formatter. To define the callables that compute the HTML representation of your objects, define a :meth:`_repr_html_` method or use the :meth:`for_type` or :meth:`for_type_by_name` methods to register functions that handle this. The return value of this formatter should

Source from the content-addressed store, hash-verified

773
774
775class HTMLFormatter(BaseFormatter):
776 """An HTML formatter.
777
778 To define the callables that compute the HTML representation of your
779 objects, define a :meth:`_repr_html_` method or use the :meth:`for_type`
780 or :meth:`for_type_by_name` methods to register functions that handle
781 this.
782
783 The return value of this formatter should be a valid HTML snippet that
784 could be injected into an existing DOM. It should *not* include the
785 ```<html>`` or ```<body>`` tags.
786 """
787 format_type = Unicode('text/html')
788
789 print_method = ObjectName('_repr_html_')
790
791
792class MarkdownFormatter(BaseFormatter):

Callers 6

test_error_methodFunction · 0.90
test_warn_error_for_typeFunction · 0.90
test_print_method_boundFunction · 0.90
test_print_method_weirdFunction · 0.90
test_format_configFunction · 0.90

Calls

no outgoing calls

Tested by 6

test_error_methodFunction · 0.72
test_warn_error_for_typeFunction · 0.72
test_print_method_boundFunction · 0.72
test_print_method_weirdFunction · 0.72
test_format_configFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…