def rebuild_entry(self, entry, styles):
entry = list(entry)
# This is the file path.
entry[0] = os.path.basename(entry[0]) if self.strip else entry[0]
# Always an int (entry line number)
entry[1] = str(entry[1])
new_entry = [
styles['line'].format(entry[1]) + Style.RESET_ALL,
styles['module'].format(entry[0]) + Style.RESET_ALL,
styles['context'].format(entry[2]) + Style.RESET_ALL,
styles['call'].format(entry[3]) + Style.RESET_ALL
]
if self.conservative:
new_entry[0], new_entry[1] = new_entry[1], new_entry[0]
return new_entry
评论列表
文章目录