Method
__init__
(
self,
mode="Plain",
# TODO: no default
theme_name="linux",
call_pdb=False,
ostream=None,
tb_offset=0,
long_header=False,
include_vars=False,
check_cache=None,
debugger_cls=None,
)
Source from the content-addressed store, hash-verified
| 1088 | mode: str |
| 1089 | |
| 1090 | def __init__( |
| 1091 | self, |
| 1092 | mode="Plain", |
| 1093 | # TODO: no default |
| 1094 | theme_name="linux", |
| 1095 | call_pdb=False, |
| 1096 | ostream=None, |
| 1097 | tb_offset=0, |
| 1098 | long_header=False, |
| 1099 | include_vars=False, |
| 1100 | check_cache=None, |
| 1101 | debugger_cls=None, |
| 1102 | ): |
| 1103 | # NEVER change the order of this list. Put new modes at the end: |
| 1104 | self.valid_modes = ["Plain", "Context", "Verbose", "Minimal", "Docs", "Doctest"] |
| 1105 | self.verbose_modes = self.valid_modes[1:3] |
| 1106 | |
| 1107 | VerboseTB.__init__( |
| 1108 | self, |
| 1109 | theme_name=theme_name, |
| 1110 | call_pdb=call_pdb, |
| 1111 | ostream=ostream, |
| 1112 | tb_offset=tb_offset, |
| 1113 | long_header=long_header, |
| 1114 | include_vars=include_vars, |
| 1115 | check_cache=check_cache, |
| 1116 | debugger_cls=debugger_cls, |
| 1117 | ) |
| 1118 | |
| 1119 | # Different types of tracebacks are joined with different separators to |
| 1120 | # form a single string. They are taken from this dict |
| 1121 | self._join_chars = dict( |
| 1122 | Plain="", Context="\n", Verbose="\n", Minimal="", Docs="", Doctest="" |
| 1123 | ) |
| 1124 | # set_mode also sets the tb_join_char attribute |
| 1125 | self.set_mode(mode) |
| 1126 | |
| 1127 | def structured_traceback( |
| 1128 | self, |
Callers
nothing calls this directly
Tested by
no test coverage detected