diff options
Diffstat (limited to 'pylint/checkers/classes/class_checker.py')
-rw-r--r-- | pylint/checkers/classes/class_checker.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pylint/checkers/classes/class_checker.py b/pylint/checkers/classes/class_checker.py index e09df1706..77a795bcb 100644 --- a/pylint/checkers/classes/class_checker.py +++ b/pylint/checkers/classes/class_checker.py @@ -1,15 +1,15 @@ # 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 +# For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE +# Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt """Classes checker for Python code.""" from __future__ import annotations import collections -import sys from collections import defaultdict from collections.abc import Callable, Sequence +from functools import cached_property from itertools import chain, zip_longest from re import Pattern from typing import TYPE_CHECKING, Any, Union @@ -47,11 +47,6 @@ if TYPE_CHECKING: from pylint.lint.pylinter import PyLinter -if sys.version_info >= (3, 8): - from functools import cached_property -else: - from astroid.decorators import cachedproperty as cached_property - _AccessNodes = Union[nodes.Attribute, nodes.AssignAttr] INVALID_BASE_CLASSES = {"bool", "range", "slice", "memoryview"} |