$62 GRAYBYTE WORDPRESS FILE MANAGER $14

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.217.149
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/testutils/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/testutils//reporter_for_tests.py
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/PyCQA/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/PyCQA/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


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
11 Feb 2026 9.30 AM
root / root
0755
__pycache__
--
11 Feb 2026 9.30 AM
root / root
0755
_primer
--
11 Feb 2026 9.30 AM
root / root
0755
functional
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.py
1.278 KB
20 Jan 2026 1.01 PM
root / root
0644
_run.py
1.513 KB
20 Jan 2026 1.01 PM
root / root
0644
checker_test_case.py
4.274 KB
20 Jan 2026 1.01 PM
root / root
0644
configuration_test.py
5.895 KB
20 Jan 2026 1.01 PM
root / root
0644
constants.py
1.118 KB
20 Jan 2026 1.01 PM
root / root
0644
decorator.py
1.223 KB
20 Jan 2026 1.01 PM
root / root
0644
functional_test_file.py
0.62 KB
20 Jan 2026 1.01 PM
root / root
0644
get_test_info.py
2.077 KB
20 Jan 2026 1.01 PM
root / root
0644
global_test_linter.py
0.669 KB
20 Jan 2026 1.01 PM
root / root
0644
lint_module_test.py
12.501 KB
20 Jan 2026 1.01 PM
root / root
0644
output_line.py
5.759 KB
20 Jan 2026 1.01 PM
root / root
0644
pyreverse.py
4.096 KB
20 Jan 2026 1.01 PM
root / root
0644
reporter_for_tests.py
2.252 KB
20 Jan 2026 1.01 PM
root / root
0644
testing_pylintrc
0.193 KB
20 Jan 2026 1.01 PM
root / root
0644
tokenize_str.py
0.437 KB
20 Jan 2026 1.01 PM
root / root
0644
unittest_linter.py
2.729 KB
20 Jan 2026 1.01 PM
root / root
0644
utils.py
3.06 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF