404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.218.63.176: ~ $
# 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

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
_primer Folder 0755
functional Folder 0755
__init__.py File 1.28 KB 0644
_run.py File 1.51 KB 0644
checker_test_case.py File 4.27 KB 0644
configuration_test.py File 5.89 KB 0644
constants.py File 1.12 KB 0644
decorator.py File 1.22 KB 0644
functional_test_file.py File 635 B 0644
get_test_info.py File 2.08 KB 0644
global_test_linter.py File 685 B 0644
lint_module_test.py File 12.5 KB 0644
output_line.py File 5.76 KB 0644
pyreverse.py File 4.1 KB 0644
reporter_for_tests.py File 2.25 KB 0644
testing_pylintrc File 198 B 0644
tokenize_str.py File 447 B 0644
unittest_linter.py File 2.73 KB 0644
utils.py File 3.06 KB 0644