GRAYBYTE WORDPRESS FILE MANAGER1072

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/testutils/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/testutils//decorator.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

import functools
from collections.abc import Callable
from typing import Any

from pylint.testutils.checker_test_case import CheckerTestCase


def set_config(**kwargs: Any) -> Callable[[Callable[..., None]], Callable[..., None]]:
    """Decorator for setting an option on the linter.

    Passing the args and kwargs back to the test function itself
    allows this decorator to be used on parameterized test cases.
    """

    def _wrapper(fun: Callable[..., None]) -> Callable[..., None]:
        @functools.wraps(fun)
        def _forward(
            self: CheckerTestCase, *args: Any, **test_function_kwargs: Any
        ) -> None:
            """Set option via argparse."""
            for key, value in kwargs.items():
                self.linter.set_option(key, value)

            # Reopen checker in case, it may be interested in configuration change
            self.checker.open()

            fun(self, *args, **test_function_kwargs)

        return _forward

    return _wrapper

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 15 2025 08:30:34
root / root
0755
__pycache__
--
May 15 2025 08:30:34
root / root
0755
_primer
--
May 15 2025 08:30:34
root / root
0755
functional
--
May 15 2025 08:30:34
root / root
0755
__init__.py
1.278 KB
April 17 2025 13:10:59
root / root
0644
_run.py
1.513 KB
April 17 2025 13:10:59
root / root
0644
checker_test_case.py
4.274 KB
April 17 2025 13:10:59
root / root
0644
configuration_test.py
5.895 KB
April 17 2025 13:10:59
root / root
0644
constants.py
1.118 KB
April 17 2025 13:10:59
root / root
0644
decorator.py
1.223 KB
April 17 2025 13:10:59
root / root
0644
functional_test_file.py
0.62 KB
April 17 2025 13:10:59
root / root
0644
get_test_info.py
2.077 KB
April 17 2025 13:10:59
root / root
0644
global_test_linter.py
0.669 KB
April 17 2025 13:10:59
root / root
0644
lint_module_test.py
12.501 KB
April 17 2025 13:10:59
root / root
0644
output_line.py
5.759 KB
April 17 2025 13:10:59
root / root
0644
pyreverse.py
4.096 KB
April 17 2025 13:10:59
root / root
0644
reporter_for_tests.py
2.252 KB
April 17 2025 13:10:59
root / root
0644
testing_pylintrc
0.193 KB
April 17 2025 13:10:59
root / root
0644
tokenize_str.py
0.437 KB
April 17 2025 13:10:59
root / root
0644
unittest_linter.py
2.729 KB
April 17 2025 13:10:59
root / root
0644
utils.py
3.06 KB
April 17 2025 13:10:59
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF