Add the fact that the error was seen in the file. :param error: The Violation instance containing the information about the violation.
(self, error: Violation)
| 23 | return sorted({key.code for key in self._store}) |
| 24 | |
| 25 | def record(self, error: Violation) -> None: |
| 26 | """Add the fact that the error was seen in the file. |
| 27 | |
| 28 | :param error: |
| 29 | The Violation instance containing the information about the |
| 30 | violation. |
| 31 | """ |
| 32 | key = Key.create_from(error) |
| 33 | if key not in self._store: |
| 34 | self._store[key] = Statistic.create_from(error) |
| 35 | self._store[key].increment() |
| 36 | |
| 37 | def statistics_for( |
| 38 | self, prefix: str, filename: str | None = None |