MCPcopy Create free account
hub / github.com/ipython/ipython / code_formatter

Method code_formatter

IPython/core/oinspect.py:600–604  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

598 bundle['text/html'] += '<h1>' + title + '</h1>\n' + formatted_field['text/html'] + '\n'
599
600 def code_formatter(text):
601 return {
602 'text/plain': self.format(text),
603 'text/html': pylight(text)
604 }
605
606 if info['isalias']:
607 append_field(_mime, 'Repr', 'string_form')

Callers

nothing calls this directly

Calls 2

pylightFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected