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

Method as_pygments_style

IPython/utils/PyColorize.py:61–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59
60 @cache
61 def as_pygments_style(self) -> Type[Style]:
62 if self.base is not None:
63 base_styles = get_style_by_name(self.base).styles
64 else:
65 base_styles = {}
66
67 class MyStyle(Style):
68 styles = {**base_styles, **self.extra_style}
69
70 return MyStyle
71
72 def format(self, stream: TokenStream) -> str:
73 return pygments.format(stream, self._formatter)

Callers 3

__init__Method · 0.95
get_recordsMethod · 0.80
get_recordsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected