diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-27 22:06:58 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-28 22:48:56 +0200 |
commit | 2f5d44d7bc91bf425fce47802a5e29852a345a34 (patch) | |
tree | 3ecf0e263be5ff455708b1a4412faff038374df0 | |
parent | 76ad6ebc7fbb2493243f84059f3d617f6392d46b (diff) | |
download | pylint-git-2f5d44d7bc91bf425fce47802a5e29852a345a34.tar.gz |
Fix classes do not defining 4 ordering comparison methods
-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""" |