Ejemplo n.º 1
0
 def _pretty_print_layer_fields(self,
                                terminal_writer: py.io.TerminalWriter):
     for field_line in self._get_all_field_lines():
         if ':' in field_line:
             field_name, field_line = field_line.split(':', 1)
             terminal_writer.write(field_name + ':', green=True, bold=True)
         terminal_writer.write(field_line, bold=True)
Ejemplo n.º 2
0
 def toterminal(self, tw: py.io.TerminalWriter) -> None:
     # filename and lineno output for each entry,
     # using an output format that most editors understand
     msg = self.message
     i = msg.find("\n")
     if i != -1:
         msg = msg[:i]
     tw.write(self.path, bold=True, red=True)
     tw.line(":{}: {}".format(self.lineno, msg))
Ejemplo n.º 3
0
 def toterminal(self, tw: py.io.TerminalWriter) -> None:
     tw.write("".join(self.lines))