REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.73 KB
Close
//proc/thread-self/root/opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/testutils/unittest_linter.py
Text
Base64
# 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 # pylint: disable=duplicate-code from __future__ import annotations import sys from typing import Any from astroid import nodes from pylint.interfaces import UNDEFINED, Confidence from pylint.lint import PyLinter from pylint.testutils.output_line import MessageTest if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal class UnittestLinter(PyLinter): """A fake linter class to capture checker messages.""" def __init__(self) -> None: self._messages: list[MessageTest] = [] super().__init__() def release_messages(self) -> list[MessageTest]: try: return self._messages finally: self._messages = [] def add_message( self, msgid: str, line: int | None = None, # TODO: Make node non optional node: nodes.NodeNG | None = None, args: Any = None, confidence: Confidence | None = None, col_offset: int | None = None, end_lineno: int | None = None, end_col_offset: int | None = None, ) -> None: """Add a MessageTest to the _messages attribute of the linter class.""" # If confidence is None we set it to UNDEFINED as well in PyLinter if confidence is None: confidence = UNDEFINED # Look up "location" data of node if not yet supplied if node: if node.position: if not line: line = node.position.lineno if not col_offset: col_offset = node.position.col_offset if not end_lineno: end_lineno = node.position.end_lineno if not end_col_offset: end_col_offset = node.position.end_col_offset else: if not line: line = node.fromlineno if not col_offset: col_offset = node.col_offset if not end_lineno: end_lineno = node.end_lineno if not end_col_offset: end_col_offset = node.end_col_offset self._messages.append( MessageTest( msgid, line, node, args, confidence, col_offset, end_lineno, end_col_offset, ) ) @staticmethod def is_message_enabled(*unused_args: Any, **unused_kwargs: Any) -> Literal[True]: return True
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 17
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
functional
DIR
-
drwxr-xr-x
2026-02-06 08:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_primer
DIR
-
drwxr-xr-x
2026-02-06 08:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-02-06 08:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
checker_test_case.py
4.27 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
configuration_test.py
5.89 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
constants.py
1.12 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
decorator.py
1.22 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
functional_test_file.py
635 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get_test_info.py
2.08 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
global_test_linter.py
685 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lint_module_test.py
12.50 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
output_line.py
5.76 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pyreverse.py
4.10 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
reporter_for_tests.py
2.25 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
testing_pylintrc
198 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tokenize_str.py
447 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
unittest_linter.py
2.73 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.py
3.06 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_run.py
1.51 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
1.28 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).