| 1028 | |
| 1029 | @attr.s(eq=False, auto_attribs=True) |
| 1030 | class ReprTraceback(TerminalRepr): |
| 1031 | reprentries: Sequence[Union["ReprEntry", "ReprEntryNative"]] |
| 1032 | extraline: Optional[str] |
| 1033 | style: "_TracebackStyle" |
| 1034 | |
| 1035 | entrysep: ClassVar = "_ " |
| 1036 | |
| 1037 | def toterminal(self, tw: TerminalWriter) -> None: |
| 1038 | # The entries might have different styles. |
| 1039 | for i, entry in enumerate(self.reprentries): |
| 1040 | if entry.style == "long": |
| 1041 | tw.line("") |
| 1042 | entry.toterminal(tw) |
| 1043 | if i < len(self.reprentries) - 1: |
| 1044 | next_entry = self.reprentries[i + 1] |
| 1045 | if ( |
| 1046 | entry.style == "long" |
| 1047 | or entry.style == "short" |
| 1048 | and next_entry.style == "long" |
| 1049 | ): |
| 1050 | tw.sep(self.entrysep) |
| 1051 | |
| 1052 | if self.extraline: |
| 1053 | tw.line(self.extraline) |
| 1054 | |
| 1055 | |
| 1056 | class ReprTracebackNative(ReprTraceback): |
no outgoing calls
no test coverage detected