collecting_reporter.py 614 B

123456789101112131415161718192021222324
  1. # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  2. # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
  3. from typing import TYPE_CHECKING
  4. from pylint.reporters.base_reporter import BaseReporter
  5. if TYPE_CHECKING:
  6. from pylint.reporters.ureports.nodes import Section
  7. class CollectingReporter(BaseReporter):
  8. """collects messages"""
  9. name = "collector"
  10. def __init__(self) -> None:
  11. super().__init__()
  12. self.messages = []
  13. def reset(self) -> None:
  14. self.messages = []
  15. def _display(self, layout: "Section") -> None:
  16. pass