MCPcopy Index your code
hub / github.com/RustPython/RustPython / emit

Method emit

Lib/traceback.py:990–1001  ·  view source on GitHub ↗
(self, text_gen, margin_char=None)

Source from the content-addressed store, hash-verified

988 return ' ' * (2 * self.exception_group_depth)
989
990 def emit(self, text_gen, margin_char=None):
991 if margin_char is None:
992 margin_char = '|'
993 indent_str = self.indent()
994 if self.exception_group_depth:
995 indent_str += margin_char + ' '
996
997 if isinstance(text_gen, str):
998 yield textwrap.indent(text_gen, indent_str, lambda line: True)
999 else:
1000 for text in text_gen:
1001 yield textwrap.indent(text, indent_str, lambda line: True)
1002
1003
1004class TracebackException:

Callers 1

formatMethod · 0.45

Calls 2

indentMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected