pylint/reporters/text.py
def handle_message(self, msg):
        """manage message of different types, and colorize output
        using ansi escape codes
        """
        if msg.module not in self._modules:
            color, style = self._get_decoration("S")
            if msg.module:
                modsep = colorize_ansi(
                    "************* Module %s" % msg.module, color, style
                )
            else:
                modsep = colorize_ansi("************* %s" % msg.module, color, style)
            self.writeln(modsep)
            self._modules.add(msg.module)
        color, style = self._get_decoration(msg.C)

        msg = msg._replace(
            **{
                attr: colorize_ansi(getattr(msg, attr), color, style)
                for attr in ("msg", "symbol", "category", "C")
            }
        )
        self.write_message(msg)
def handle_message(self, msg):
        """manage message of different types, and colorize output
        using ansi escape codes
        """
        if msg.module not in self._modules:
            color, style = self._get_decoration("S")
            if msg.module:
                modsep = colorize_ansi(
                    "************* Module %s" % msg.module, color, style
                )
            else:
                modsep = colorize_ansi("************* %s" % msg.module, color, style)
            self.writeln(modsep)
            self._modules.add(msg.module)
        color, style = self._get_decoration(msg.C)

        msg = msg._replace(
            **{
                attr: colorize_ansi(getattr(msg, attr), color, style)
                for attr in ("msg", "symbol", "category", "C")
            }
        )
        self.write_message(msg)
manage message of different types, and colorize output
        using ansi escape codes