mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 07:58:04 +00:00
273492326c
This permit to have less cross dependency as the utils package does not depend on anything. The checker package still depends on reporter. Also moved classes from __init__ to their own file in reporter.
22 lines
503 B
Python
22 lines
503 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
|
|
|
|
from pylint.reporters.base_reporter import BaseReporter
|
|
|
|
|
|
class CollectingReporter(BaseReporter):
|
|
"""collects messages"""
|
|
|
|
name = "collector"
|
|
|
|
def __init__(self):
|
|
BaseReporter.__init__(self)
|
|
self.messages = []
|
|
|
|
def handle_message(self, msg):
|
|
self.messages.append(msg)
|
|
|
|
_display = None
|