1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
# flake8: noqa
# pylint: skip-file
# no sane linter can figure out the hackiness in this compatability layer...
try:
from astroid.nodes import ClassDef, FunctionDef, ImportFrom, AssignName, Attribute
except ImportError:
from astroid.nodes import (
Class as ClassDef,
Function as FunctionDef,
From as ImportFrom,
AssName as AssignName,
Getattr as Attribute,
)
# pylint 2.04->2.2 : YES was renamed to Uninferable, then YES became deprecated, then was removed
try:
from astroid.bases import YES as Uninferable
except ImportError:
try:
from astroid.util import YES as Uninferable
except ImportError:
from astroid.util import Uninferable
try:
from pylint.checkers.utils import check_messages
except (ImportError, ModuleNotFoundError):
from pylint.checkers.utils import only_required_for_messages as check_messages
import pylint
# pylint before version 2.3 does not support load_configuration() hook.
LOAD_CONFIGURATION_SUPPORTED = pylint.__pkginfo__.numversion >= (2, 3)
|