diff options
-rw-r--r-- | pylint/checkers/base_checker.py | 3 | ||||
-rw-r--r-- | pylint/checkers/similar.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pylint/checkers/base_checker.py b/pylint/checkers/base_checker.py index 9aa474f18..4baf8e57b 100644 --- a/pylint/checkers/base_checker.py +++ b/pylint/checkers/base_checker.py @@ -14,7 +14,7 @@ # 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 functools from inspect import cleandoc from typing import Any @@ -26,6 +26,7 @@ from pylint.message.message_definition import MessageDefinition from pylint.utils import get_rst_section, get_rst_title +@functools.total_ordering class BaseChecker(OptionsProviderMixIn): # checker name (you may reuse an existing one) diff --git a/pylint/checkers/similar.py b/pylint/checkers/similar.py index 5495e5c7a..6b6337d29 100644 --- a/pylint/checkers/similar.py +++ b/pylint/checkers/similar.py @@ -24,7 +24,7 @@ # pylint: disable=redefined-builtin """a similarities / code duplication command line tool and pylint checker """ - +import functools import re import sys from collections import defaultdict @@ -223,6 +223,7 @@ def stripped_lines(lines, ignore_comments, ignore_docstrings, ignore_imports): return strippedlines +@functools.total_ordering class LineSet: """Holds and indexes all the lines of a single source file""" |