def process(self, output):
        '''Split PyChecker/-Flakes output into
           OK'd and other warning messages.
        '''
        if self._OKd:
            self.printf('Splitting...')
        if self._debug:
            self.debugf('source directories...')
            for t in enumerate(self._dirs):
                self.printf('%5d: %r', *t)

        mt = []  # list of 2-tuples (message, OK'd)
        e = False  # or a split INTERNAL ERROR line
        n = t = 0  # number of non-OK'd, total warnings
        for m in output:  # process each warning line
            m = b2s(m).rstrip()
            if m:  # only non-blank lines
                if e and _Xtb:  # after INTERNAL ERROR
                    s = m.lstrip()
                    if len(s) < len(m):  # traceback line
                        e[2] = ' ' + s  # save last one
                        continue
                    # build another INTERNAL ERROR
                    # from the last trackback line,
                    # usually the exception raised
                    mt.append((':'.join(e), _INTERROR))
                    e = False
                # split and process warning line
                ok, s = '', m.split(':', 2)
                if len(s) > 2:  # file name, line number, rest
                    if not s[1].isdigit():
                        self.debugf('no line number: %r', m)
                        continue
                    ok = self.isOK(*s)
                    if not ok:
                        n += 1  # non-OK'd
                        if ok is _INTERROR:
                            e = s
                    t += 1  # total
                elif _EW or m in (_Warnings, _None):
                    continue
                mt.append((m, ok))

        if self._out:
            if self._OKd:  # print OK'd warnings
                self.printf("%sLines OK'd...", _NL)
                m = [m + ' - ' + ok for m, ok in mt if ok]  # PYCHOK expected
                self.printf(_NL.join(m) or _None)

            # print other warnings (and lines)
            m = [m for m, ok in mt if not ok]  # PYCHOK expected
            if m:  # print always
                self.printf(_NL + _Warnings)
                self.printf(_NL.join(m))
            elif t > 1 and self._OKd:
                self.printf(_NL + _Warnings)
                self.printf("%s, all %s OK'd", _None, t)

        return n  # number of non-OK'd warnings
Split PyChecker/-Flakes output into
           OK'd and other warning messages.
        
recipes/Python/546532_PyChecker_postprocessor/recipe-546532.py