mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-29 17:01:44 +01:00
53 lines
1.4 KiB
Python
53 lines
1.4 KiB
Python
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
|
|
|
|
import re
|
|
import sys
|
|
|
|
from astroid.__pkginfo__ import version as astroid_version
|
|
|
|
from pylint.__pkginfo__ import version as pylint_version
|
|
|
|
# Allow stopping after the first semicolon/hash encountered,
|
|
# so that an option can be continued with the reasons
|
|
# why it is active or disabled.
|
|
OPTION_RGX = re.compile(r"\s*#.*\bpylint:\s*([^;#]+)[;#]{0,1}")
|
|
|
|
PY_EXTS = (".py", ".pyc", ".pyo", ".pyw", ".so", ".dll")
|
|
|
|
MSG_STATE_CONFIDENCE = 2
|
|
_MSG_ORDER = "EWRCIF"
|
|
MSG_STATE_SCOPE_CONFIG = 0
|
|
MSG_STATE_SCOPE_MODULE = 1
|
|
|
|
# The line/node distinction does not apply to fatal errors and reports.
|
|
_SCOPE_EXEMPT = "FR"
|
|
|
|
MSG_TYPES = {
|
|
"I": "info",
|
|
"C": "convention",
|
|
"R": "refactor",
|
|
"W": "warning",
|
|
"E": "error",
|
|
"F": "fatal",
|
|
}
|
|
MSG_TYPES_LONG = {v: k for k, v in MSG_TYPES.items()}
|
|
|
|
MSG_TYPES_STATUS = {"I": 0, "C": 16, "R": 8, "W": 4, "E": 2, "F": 1}
|
|
|
|
# You probably don't want to change the MAIN_CHECKER_NAME
|
|
# This would affect rcfile generation and retro-compatibility
|
|
# on all project using [MASTER] in their rcfile.
|
|
MAIN_CHECKER_NAME = "master"
|
|
|
|
|
|
class WarningScope:
|
|
LINE = "line-based-msg"
|
|
NODE = "node-based-msg"
|
|
|
|
|
|
full_version = "pylint %s\nastroid %s\nPython %s" % (
|
|
pylint_version,
|
|
astroid_version,
|
|
sys.version,
|
|
)
|