/opt/imh-python/lib/python3.9/site-packages/pylint/testutils
NameSizeModeActions
functional/-0755rm
_primer/-0755rm
__pycache__/-0755rm
checker_test_case.py33250644editdlrm
configuration_test.py54160644editdlrm
constants.py11590644editdlrm
decorator.py12620644editdlrm
get_test_info.py21370644editdlrm
global_test_linter.py6950644editdlrm
lint_module_test.py125380644editdlrm
output_line.py39940644editdlrm
pyreverse.py42540644editdlrm
reporter_for_tests.py23210644editdlrm
testing_pylintrc2640644editdlrm
tokenize_str.py4570644editdlrm
unittest_linter.py26920644editdlrm
utils.py31070644editdlrm
_run.py14300644editdlrm
__init__.py13190644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/pylint/testutils/reporter_for_tests.py (2321B)
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE # Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt from __future__ import annotations from io import StringIO from os import getcwd, sep from typing import TYPE_CHECKING from pylint.message import Message from pylint.reporters import BaseReporter if TYPE_CHECKING: from pylint.reporters.ureports.nodes import Section class GenericTestReporter(BaseReporter): """Reporter storing plain text messages.""" out: StringIO def __init__( # pylint: disable=super-init-not-called # See https://github.com/pylint-dev/pylint/issues/4941 self, ) -> None: self.path_strip_prefix: str = getcwd() + sep self.reset() def reset(self) -> None: self.out = StringIO() self.messages: list[Message] = [] def handle_message(self, msg: Message) -> None: """Append messages to the list of messages of the reporter.""" self.messages.append(msg) def finalize(self) -> str: """Format and print messages in the context of the path.""" messages: list[str] = [] for msg in self.messages: obj = "" if msg.obj: obj = f":{msg.obj}" messages.append(f"{msg.msg_id[0]}:{msg.line:>3}{obj}: {msg.msg}") messages.sort() for message in messages: print(message, file=self.out) result = self.out.getvalue() self.reset() return result def on_set_current_module(self, module: str, filepath: str | None) -> None: pass # pylint: enable=unused-argument def display_reports(self, layout: Section) -> None: """Ignore layouts.""" def _display(self, layout: Section) -> None: pass class MinimalTestReporter(BaseReporter): def on_set_current_module(self, module: str, filepath: str | None) -> None: self.messages = [] def _display(self, layout: Section) -> None: pass class FunctionalTestReporter(BaseReporter): def display_reports(self, layout: Section) -> None: """Ignore layouts and don't call self._display().""" def _display(self, layout: Section) -> None: pass