def _process_code_line(self, line):
"""
Process a line of code in the traceback.
"""
if self._isolate and not self._file_in_dir():
# Print without colors.
self._print(line)
else:
if self._isolate:
line = line[1:]
self._print(">", fg="red", style="bright")
line = highlight(line, PythonLexer(), TerminalFormatter(style="monokai"))
self._print(line.rstrip("\r\n"))
评论列表
文章目录