MCPcopy Index your code
hub / github.com/python/cpython / emit

Method emit

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

Source from the content-addressed store, hash-verified

1008 return ' ' * (2 * self.exception_group_depth)
1009
1010 def emit(self, text_gen, margin_char=None):
1011 if margin_char is None:
1012 margin_char = '|'
1013 indent_str = self.indent()
1014 if self.exception_group_depth:
1015 indent_str += margin_char + ' '
1016
1017 if isinstance(text_gen, str):
1018 yield textwrap.indent(text_gen, indent_str, lambda line: True)
1019 else:
1020 for text in text_gen:
1021 yield textwrap.indent(text, indent_str, lambda line: True)
1022
1023
1024class TracebackException:

Callers 1

formatMethod · 0.45

Calls 1

indentMethod · 0.95

Tested by

no test coverage detected