diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-03-23 19:48:42 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-03-24 22:40:30 +0100 |
commit | ddfca0ca884d677e4eb0e6f53553b16e7a503157 (patch) | |
tree | bc1c0f99d4e141666ef66913648fedc69808496b | |
parent | be4699399904654ef4107a228817b4ef176d8999 (diff) | |
download | pylint-git-ddfca0ca884d677e4eb0e6f53553b16e7a503157.tar.gz |
[refactor] Create a file for _BasicChecker in pylint.checkers
-rw-r--r-- | pylint/checkers/base/__init__.py | 8 | ||||
-rw-r--r-- | pylint/checkers/base/basic_checker.py | 13 |
2 files changed, 15 insertions, 6 deletions
diff --git a/pylint/checkers/base/__init__.py b/pylint/checkers/base/__init__.py index 43076d669..c2cb771e1 100644 --- a/pylint/checkers/base/__init__.py +++ b/pylint/checkers/base/__init__.py @@ -12,9 +12,10 @@ from typing import TYPE_CHECKING, Any, Dict, Iterator, Optional, Pattern, Tuple, import astroid from astroid import nodes -from pylint import checkers, constants, interfaces +from pylint import constants, interfaces from pylint import utils as lint_utils from pylint.checkers import utils +from pylint.checkers.base.basic_checker import _BasicChecker from pylint.checkers.utils import ( infer_all, is_overload_stub, @@ -398,11 +399,6 @@ def redefined_by_decorator(node): return False -class _BasicChecker(checkers.BaseChecker): - __implements__ = interfaces.IAstroidChecker - name = "basic" - - class BasicErrorChecker(_BasicChecker): msgs = { "E0100": ( diff --git a/pylint/checkers/base/basic_checker.py b/pylint/checkers/base/basic_checker.py new file mode 100644 index 000000000..4ad789fd5 --- /dev/null +++ b/pylint/checkers/base/basic_checker.py @@ -0,0 +1,13 @@ +# 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 + +"""Permits separating multiple checks with the same checker name into classes/file.""" + +from pylint.checkers import BaseChecker +from pylint.interfaces import IAstroidChecker + + +class _BasicChecker(BaseChecker): + __implements__ = IAstroidChecker + name = "basic" |