Skip to content

Commit

Permalink
[refactor] Create a file for _BasicChecker in pylint.checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Mar 24, 2022
1 parent be46993 commit ddfca0c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pylint/checkers/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
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,
Expand Down Expand Up @@ -398,11 +399,6 @@ def x(self, value): self._x = value
return False


class _BasicChecker(checkers.BaseChecker):
__implements__ = interfaces.IAstroidChecker
name = "basic"


class BasicErrorChecker(_BasicChecker):
msgs = {
"E0100": (
Expand Down
13 changes: 13 additions & 0 deletions pylint/checkers/base/basic_checker.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit ddfca0c

Please sign in to comment.