<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def error(self, line_number, offset, text, check):
 """Save errors."""

        code = super(_PycodestyleReport, self).error(
            line_number, offset, text, check)

        if code:
            self.errors.append(dict(
                text=text,
                type=code.replace('E', 'C'),
                col=offset + 1,
                lnum=line_number,
            ))