2019-03-09 20:16:35 +00:00
|
|
|
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
2021-07-01 10:47:58 +00:00
|
|
|
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
|
2022-03-01 15:04:49 +00:00
|
|
|
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
|
|
|
|
|
2021-09-16 20:12:19 +00:00
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
2019-03-09 20:16:35 +00:00
|
|
|
from pylint.reporters.base_reporter import BaseReporter
|
|
|
|
|
2021-09-16 20:12:19 +00:00
|
|
|
if TYPE_CHECKING:
|
|
|
|
from pylint.reporters.ureports.nodes import Section
|
|
|
|
|
2019-03-09 20:16:35 +00:00
|
|
|
|
|
|
|
class CollectingReporter(BaseReporter):
|
2022-02-10 18:30:15 +00:00
|
|
|
"""Collects messages."""
|
2019-03-09 20:16:35 +00:00
|
|
|
|
|
|
|
name = "collector"
|
|
|
|
|
2021-09-16 09:03:37 +00:00
|
|
|
def __init__(self) -> None:
|
2021-09-28 06:06:32 +00:00
|
|
|
super().__init__()
|
2019-03-09 20:16:35 +00:00
|
|
|
self.messages = []
|
|
|
|
|
2021-09-16 09:03:37 +00:00
|
|
|
def reset(self) -> None:
|
2020-07-17 08:31:09 +00:00
|
|
|
self.messages = []
|
|
|
|
|
2021-09-16 20:12:19 +00:00
|
|
|
def _display(self, layout: "Section") -> None:
|
|
|
|
pass
|