PHP 8.2.30
Preview: exceptions.py Size: 1.68 KB
/proc/self/root/opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/exceptions.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

"""Exception classes raised by various operations within pylint."""


class InvalidMessageError(Exception):
    """Raised when a message creation, registration or addition is rejected."""


class UnknownMessageError(Exception):
    """Raised when an unregistered message id is encountered."""


class DeletedMessageError(UnknownMessageError):
    """Raised when a message id or symbol that was deleted from pylint is
    encountered.
    """

    def __init__(self, msgid_or_symbol: str, removal_explanation: str):
        super().__init__(
            f"'{msgid_or_symbol}' was removed from pylint, see {removal_explanation}."
        )


class MessageBecameExtensionError(UnknownMessageError):
    """Raised when a message id or symbol that was moved to an optional
    extension is encountered.
    """

    def __init__(self, msgid_or_symbol: str, moved_explanation: str):
        super().__init__(
            f"'{msgid_or_symbol}' was moved to an optional extension, see {moved_explanation}."
        )


class EmptyReportError(Exception):
    """Raised when a report is empty and so should not be displayed."""


class InvalidReporterError(Exception):
    """Raised when selected reporter is invalid (e.g. not found)."""


class InvalidArgsError(ValueError):
    """Raised when passed arguments are invalid, e.g., have the wrong length."""


class NoLineSuppliedError(Exception):
    """Raised when trying to disable a message on a next line without supplying a line
    number.
    """

Directory Contents

Dirs: 10 × Files: 9

Name Size Perms Modified Actions
checkers DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
config DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
lint DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
message DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
pyreverse DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
reporters DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
testutils DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
utils DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
9.91 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
7.18 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
1.68 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
6.95 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
3.96 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
3.17 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
3.48 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download
305 B lrw-r--r-- 2026-01-20 13:01:48
Edit Download
1.31 KB lrw-r--r-- 2026-01-20 13:01:48
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).