summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/how_tos/custom_checkers.rst2
-rw-r--r--examples/custom.py5
-rw-r--r--examples/deprecation_checker.py2
-rw-r--r--pylint/checkers/async.py3
-rw-r--r--pylint/checkers/base/basic_checker.py6
-rw-r--r--pylint/checkers/classes/class_checker.py4
-rw-r--r--pylint/checkers/classes/special_methods_checker.py2
-rw-r--r--pylint/checkers/design_analysis.py3
-rw-r--r--pylint/checkers/dunder_methods.py4
-rw-r--r--pylint/checkers/ellipsis_checker.py2
-rw-r--r--pylint/checkers/exceptions.py4
-rw-r--r--pylint/checkers/format.py3
-rw-r--r--pylint/checkers/imports.py3
-rw-r--r--pylint/checkers/logging.py3
-rw-r--r--pylint/checkers/modified_iterating_checker.py2
-rw-r--r--pylint/checkers/newstyle.py3
-rw-r--r--pylint/checkers/non_ascii_names.py2
-rw-r--r--pylint/checkers/refactoring/implicit_booleaness_checker.py4
-rw-r--r--pylint/checkers/refactoring/not_checker.py3
-rw-r--r--pylint/checkers/refactoring/recommendation_checker.py3
-rw-r--r--pylint/checkers/spelling.py2
-rw-r--r--pylint/checkers/stdlib.py2
-rw-r--r--pylint/checkers/strings.py3
-rw-r--r--pylint/checkers/threading_checker.py2
-rw-r--r--pylint/checkers/typecheck.py5
-rw-r--r--pylint/checkers/unsupported_version.py2
-rw-r--r--pylint/checkers/utils.py2
-rw-r--r--pylint/checkers/variables.py10
-rw-r--r--pylint/extensions/bad_builtin.py2
-rw-r--r--pylint/extensions/broad_try_clause.py4
-rw-r--r--pylint/extensions/check_elif.py3
-rw-r--r--pylint/extensions/code_style.py3
-rw-r--r--pylint/extensions/comparetozero.py4
-rw-r--r--pylint/extensions/comparison_placement.py3
-rw-r--r--pylint/extensions/confusing_elif.py3
-rw-r--r--pylint/extensions/consider_ternary_expression.py2
-rw-r--r--pylint/extensions/docparams.py3
-rw-r--r--pylint/extensions/docstyle.py3
-rw-r--r--pylint/extensions/emptystring.py4
-rw-r--r--pylint/extensions/eq_without_hash.py1
-rw-r--r--pylint/extensions/for_any_all.py2
-rw-r--r--pylint/extensions/mccabe.py3
-rw-r--r--pylint/extensions/overlapping_exceptions.py4
-rw-r--r--pylint/extensions/private_import.py3
-rw-r--r--pylint/extensions/redefined_variable_type.py3
-rw-r--r--pylint/extensions/set_membership.py3
-rw-r--r--pylint/extensions/typing.py4
-rw-r--r--pylint/extensions/while_used.py2
-rw-r--r--pylint/lint/pylinter.py2
-rw-r--r--tests/checkers/unittest_deprecated.py3
-rw-r--r--tests/lint/unittest_lint.py1
51 files changed, 22 insertions, 134 deletions
diff --git a/doc/how_tos/custom_checkers.rst b/doc/how_tos/custom_checkers.rst
index 90b8695af..5d0c73659 100644
--- a/doc/how_tos/custom_checkers.rst
+++ b/doc/how_tos/custom_checkers.rst
@@ -40,14 +40,12 @@ Firstly we will need to fill in some required boilerplate:
from typing import TYPE_CHECKING, Optional
from pylint.checkers import BaseChecker
- from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
class UniqueReturnChecker(BaseChecker):
- __implements__ = IAstroidChecker
name = "unique-returns"
msgs = {
diff --git a/examples/custom.py b/examples/custom.py
index a647f8518..b05954d45 100644
--- a/examples/custom.py
+++ b/examples/custom.py
@@ -3,7 +3,6 @@ from typing import TYPE_CHECKING
from astroid import nodes
from pylint.checkers import BaseChecker
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -14,10 +13,6 @@ if TYPE_CHECKING:
class MyAstroidChecker(BaseChecker):
"""Add class member attributes to the class local's dictionary."""
- # This class variable defines the type of checker that we are implementing.
- # In this case, we are implementing an AST checker.
- __implements__ = IAstroidChecker
-
# The name defines a custom section of the config for this checker.
name = "custom"
# This class variable declares the messages (ie the warnings and errors)
diff --git a/examples/deprecation_checker.py b/examples/deprecation_checker.py
index db4596096..52244edf6 100644
--- a/examples/deprecation_checker.py
+++ b/examples/deprecation_checker.py
@@ -43,7 +43,6 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from pylint.checkers import BaseChecker, DeprecatedMixin
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -57,7 +56,6 @@ class DeprecationChecker(DeprecatedMixin, BaseChecker):
# DeprecatedMixin class is overriding attributes of BaseChecker hence must be specified *before* BaseChecker
# in list of base classes.
- __implements__ = (IAstroidChecker,)
# The name defines a custom section of the config for this checker.
name = "deprecated"
diff --git a/pylint/checkers/async.py b/pylint/checkers/async.py
index 3c65d53e1..d07e64096 100644
--- a/pylint/checkers/async.py
+++ b/pylint/checkers/async.py
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING
import astroid
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils as checker_utils
from pylint.checkers.utils import decorated_with
@@ -21,7 +21,6 @@ if TYPE_CHECKING:
class AsyncChecker(checkers.BaseChecker):
- __implements__ = interfaces.IAstroidChecker
name = "async"
msgs = {
"E1700": (
diff --git a/pylint/checkers/base/basic_checker.py b/pylint/checkers/base/basic_checker.py
index 21ed1fa7c..9157b1620 100644
--- a/pylint/checkers/base/basic_checker.py
+++ b/pylint/checkers/base/basic_checker.py
@@ -14,10 +14,9 @@ from typing import TYPE_CHECKING, cast
import astroid
from astroid import nodes
-from pylint import interfaces
from pylint import utils as lint_utils
from pylint.checkers import BaseChecker, utils
-from pylint.interfaces import HIGH, IAstroidChecker
+from pylint.interfaces import HIGH
from pylint.reporters.ureports import nodes as reporter_nodes
from pylint.utils import LinterStats
@@ -33,7 +32,6 @@ else:
class _BasicChecker(BaseChecker):
"""Permits separating multiple checks with the same checker name into classes/file."""
- __implements__ = IAstroidChecker
name = "basic"
@@ -116,8 +114,6 @@ class BasicChecker(_BasicChecker):
* uses of the global statement
"""
- __implements__ = interfaces.IAstroidChecker
-
name = "basic"
msgs = {
"W0101": (
diff --git a/pylint/checkers/classes/class_checker.py b/pylint/checkers/classes/class_checker.py
index e3e652bd5..49910448d 100644
--- a/pylint/checkers/classes/class_checker.py
+++ b/pylint/checkers/classes/class_checker.py
@@ -38,7 +38,7 @@ from pylint.checkers.utils import (
unimplemented_abstract_methods,
uninferable_final_decorators,
)
-from pylint.interfaces import HIGH, INFERENCE, IAstroidChecker
+from pylint.interfaces import HIGH, INFERENCE
if sys.version_info >= (3, 8):
from functools import cached_property
@@ -700,8 +700,6 @@ class ClassChecker(BaseChecker):
* unreachable code
"""
- __implements__ = (IAstroidChecker,)
-
# configuration section name
name = "classes"
# messages
diff --git a/pylint/checkers/classes/special_methods_checker.py b/pylint/checkers/classes/special_methods_checker.py
index 92282b3d2..aa8d14817 100644
--- a/pylint/checkers/classes/special_methods_checker.py
+++ b/pylint/checkers/classes/special_methods_checker.py
@@ -16,7 +16,6 @@ from pylint.checkers.utils import (
is_function_body_ellipsis,
safe_infer,
)
-from pylint.interfaces import IAstroidChecker
NEXT_METHOD = "__next__"
@@ -48,7 +47,6 @@ class SpecialMethodsChecker(BaseChecker):
are implemented correctly.
"""
- __implements__ = (IAstroidChecker,)
name = "classes"
msgs = {
"E0301": (
diff --git a/pylint/checkers/design_analysis.py b/pylint/checkers/design_analysis.py
index e343a4a6b..d0cd46582 100644
--- a/pylint/checkers/design_analysis.py
+++ b/pylint/checkers/design_analysis.py
@@ -17,7 +17,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if sys.version_info >= (3, 8):
from functools import cached_property
@@ -280,8 +279,6 @@ class MisdesignChecker(BaseChecker):
* size, complexity of functions, methods
"""
- __implements__ = (IAstroidChecker,)
-
# configuration section name
name = "design"
# messages
diff --git a/pylint/checkers/dunder_methods.py b/pylint/checkers/dunder_methods.py
index 12ec176d8..006865b62 100644
--- a/pylint/checkers/dunder_methods.py
+++ b/pylint/checkers/dunder_methods.py
@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING
from astroid import nodes
from pylint.checkers import BaseChecker
-from pylint.interfaces import HIGH, IAstroidChecker
+from pylint.interfaces import HIGH
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -30,8 +30,6 @@ class DunderCallChecker(BaseChecker):
these can't be written in an alternative manner.
"""
- __implements__ = IAstroidChecker
-
includedict = {
"__repr__": "Use repr built-in function",
"__str__": "Use str built-in function",
diff --git a/pylint/checkers/ellipsis_checker.py b/pylint/checkers/ellipsis_checker.py
index 4fe476eb3..953b42e93 100644
--- a/pylint/checkers/ellipsis_checker.py
+++ b/pylint/checkers/ellipsis_checker.py
@@ -12,14 +12,12 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
class EllipsisChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "unnecessary_ellipsis"
msgs = {
"W2301": (
diff --git a/pylint/checkers/exceptions.py b/pylint/checkers/exceptions.py
index 7279b1c35..ba90c9571 100644
--- a/pylint/checkers/exceptions.py
+++ b/pylint/checkers/exceptions.py
@@ -13,7 +13,7 @@ from typing import TYPE_CHECKING, Any
import astroid
from astroid import nodes, objects
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
if TYPE_CHECKING:
@@ -230,8 +230,6 @@ class ExceptionRaiseLeafVisitor(BaseVisitor):
class ExceptionsChecker(checkers.BaseChecker):
"""Exception related checks."""
- __implements__ = interfaces.IAstroidChecker
-
name = "exceptions"
msgs = MSGS
options = (
diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py
index 5ed40041d..bbd4cc208 100644
--- a/pylint/checkers/format.py
+++ b/pylint/checkers/format.py
@@ -27,7 +27,6 @@ from pylint.checkers.utils import (
node_frame_class,
)
from pylint.constants import WarningScope
-from pylint.interfaces import IAstroidChecker
from pylint.utils.pragma_parser import OPTION_PO, PragmaParserError, parse_pragma
if TYPE_CHECKING:
@@ -204,8 +203,6 @@ class FormatChecker(BaseTokenChecker, BaseRawFileChecker):
* line length
"""
- __implements__ = IAstroidChecker
-
# configuration section name
name = "format"
# messages
diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py
index 1c472952d..003bad287 100644
--- a/pylint/checkers/imports.py
+++ b/pylint/checkers/imports.py
@@ -25,7 +25,6 @@ from pylint.checkers.utils import (
)
from pylint.exceptions import EmptyReportError
from pylint.graph import DotBackend, get_cycles
-from pylint.interfaces import IAstroidChecker
from pylint.reporters.ureports.nodes import Paragraph, Section, VerbatimText
from pylint.utils import IsortDriver
@@ -282,8 +281,6 @@ class ImportsChecker(DeprecatedMixin, BaseChecker):
* uses of modules instead of preferred modules
"""
- __implements__ = IAstroidChecker
-
name = "imports"
msgs = MSGS
default_deprecated_modules = ()
diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py
index be646990a..7c6e75fcb 100644
--- a/pylint/checkers/logging.py
+++ b/pylint/checkers/logging.py
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING
import astroid
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
from pylint.checkers.utils import infer_all
@@ -119,7 +119,6 @@ def is_method_call(func, types=(), methods=()):
class LoggingChecker(checkers.BaseChecker):
"""Checks use of the logging module."""
- __implements__ = interfaces.IAstroidChecker
name = "logging"
msgs = MSGS
diff --git a/pylint/checkers/modified_iterating_checker.py b/pylint/checkers/modified_iterating_checker.py
index 0b975cf65..1a479135f 100644
--- a/pylint/checkers/modified_iterating_checker.py
+++ b/pylint/checkers/modified_iterating_checker.py
@@ -25,8 +25,6 @@ class ModifiedIterationChecker(checkers.BaseChecker):
Currently supports `for` loops for Sets, Dictionaries and Lists.
"""
- __implements__ = interfaces.IAstroidChecker
-
name = "modified_iteration"
msgs = {
diff --git a/pylint/checkers/newstyle.py b/pylint/checkers/newstyle.py
index a36ca851c..e554231be 100644
--- a/pylint/checkers/newstyle.py
+++ b/pylint/checkers/newstyle.py
@@ -13,7 +13,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages, has_known_bases, node_frame_class
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -36,8 +35,6 @@ class NewStyleConflictChecker(BaseChecker):
* "super" usage
"""
- __implements__ = (IAstroidChecker,)
-
# configuration section name
name = "newstyle"
# messages
diff --git a/pylint/checkers/non_ascii_names.py b/pylint/checkers/non_ascii_names.py
index f6ac3e569..1371b65c7 100644
--- a/pylint/checkers/non_ascii_names.py
+++ b/pylint/checkers/non_ascii_names.py
@@ -34,8 +34,6 @@ class NonAsciiNameChecker(base_checker.BaseChecker):
docstrings and comments!
"""
- __implements__ = interfaces.IAstroidChecker
-
msgs = {
"C2401": (
'%s name "%s" contains a non-ASCII character, consider renaming it.',
diff --git a/pylint/checkers/refactoring/implicit_booleaness_checker.py b/pylint/checkers/refactoring/implicit_booleaness_checker.py
index bea5a3607..7a6f44fc8 100644
--- a/pylint/checkers/refactoring/implicit_booleaness_checker.py
+++ b/pylint/checkers/refactoring/implicit_booleaness_checker.py
@@ -7,7 +7,7 @@ from __future__ import annotations
import astroid
from astroid import bases, nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
@@ -50,8 +50,6 @@ class ImplicitBooleanessChecker(checkers.BaseChecker):
* comparison such as variable != empty_literal:
"""
- __implements__ = (interfaces.IAstroidChecker,)
-
# configuration section name
name = "refactoring"
msgs = {
diff --git a/pylint/checkers/refactoring/not_checker.py b/pylint/checkers/refactoring/not_checker.py
index 85d33bfdb..1fb77a36e 100644
--- a/pylint/checkers/refactoring/not_checker.py
+++ b/pylint/checkers/refactoring/not_checker.py
@@ -5,7 +5,7 @@
import astroid
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
@@ -16,7 +16,6 @@ class NotChecker(checkers.BaseChecker):
- "not" followed by a comparison should trigger a warning
"""
- __implements__ = (interfaces.IAstroidChecker,)
msgs = {
"C0113": (
'Consider changing "%s" to "%s"',
diff --git a/pylint/checkers/refactoring/recommendation_checker.py b/pylint/checkers/refactoring/recommendation_checker.py
index 31b4e3fcb..6c0d94354 100644
--- a/pylint/checkers/refactoring/recommendation_checker.py
+++ b/pylint/checkers/refactoring/recommendation_checker.py
@@ -7,13 +7,12 @@ from __future__ import annotations
import astroid
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
class RecommendationChecker(checkers.BaseChecker):
- __implements__ = (interfaces.IAstroidChecker,)
name = "refactoring"
msgs = {
"C0200": (
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py
index 72c389049..bc5e4bad3 100644
--- a/pylint/checkers/spelling.py
+++ b/pylint/checkers/spelling.py
@@ -16,7 +16,6 @@ from astroid import nodes
from pylint.checkers import BaseTokenChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -183,7 +182,6 @@ def _strip_code_flanked_in_backticks(line: str) -> str:
class SpellingChecker(BaseTokenChecker):
"""Check spelling in comments and docstrings."""
- __implements__ = IAstroidChecker
name = "spelling"
msgs = {
"C0401": (
diff --git a/pylint/checkers/stdlib.py b/pylint/checkers/stdlib.py
index 72d5a0454..24ef53cbe 100644
--- a/pylint/checkers/stdlib.py
+++ b/pylint/checkers/stdlib.py
@@ -15,7 +15,6 @@ from astroid import nodes
from pylint import interfaces
from pylint.checkers import BaseChecker, DeprecatedMixin, utils
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -313,7 +312,6 @@ def _check_mode_str(mode):
class StdlibChecker(DeprecatedMixin, BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "stdlib"
msgs = {
diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py
index c19264901..b6d6de28f 100644
--- a/pylint/checkers/strings.py
+++ b/pylint/checkers/strings.py
@@ -19,7 +19,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker, BaseRawFileChecker, BaseTokenChecker, utils
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -232,7 +231,6 @@ class StringFormatChecker(BaseChecker):
is valid and the arguments match the format string.
"""
- __implements__ = (IAstroidChecker,)
name = "string"
msgs = MSGS
@@ -619,7 +617,6 @@ class StringFormatChecker(BaseChecker):
class StringConstantChecker(BaseTokenChecker, BaseRawFileChecker):
"""Check string literals."""
- __implements__ = IAstroidChecker
name = "string"
msgs = {
"W1401": (
diff --git a/pylint/checkers/threading_checker.py b/pylint/checkers/threading_checker.py
index cb565d79b..3b0af7011 100644
--- a/pylint/checkers/threading_checker.py
+++ b/pylint/checkers/threading_checker.py
@@ -8,7 +8,6 @@ from typing import TYPE_CHECKING
from astroid import nodes
-from pylint import interfaces
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages, safe_infer
@@ -22,7 +21,6 @@ class ThreadingChecker(BaseChecker):
- useless with lock - locking used in wrong way that has no effect (with threading.Lock():)
"""
- __implements__ = interfaces.IAstroidChecker
name = "threading"
LOCKS = frozenset(
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index 9f899b302..5ad6027bc 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -45,7 +45,7 @@ from pylint.checkers.utils import (
supports_membership_test,
supports_setitem,
)
-from pylint.interfaces import INFERENCE, IAstroidChecker
+from pylint.interfaces import INFERENCE
if sys.version_info >= (3, 8):
from functools import cached_property
@@ -725,8 +725,6 @@ def _is_invalid_isinstance_type(arg):
class TypeChecker(BaseChecker):
"""Try to find bugs in the code using type inference."""
- __implements__ = (IAstroidChecker,)
-
# configuration section name
name = "typecheck"
# messages
@@ -1997,7 +1995,6 @@ class IterableChecker(BaseChecker):
Also checks for non-mappings in function call kwargs.
"""
- __implements__ = (IAstroidChecker,)
name = "typecheck"
msgs = {
diff --git a/pylint/checkers/unsupported_version.py b/pylint/checkers/unsupported_version.py
index 063a084b2..ecd7ca683 100644
--- a/pylint/checkers/unsupported_version.py
+++ b/pylint/checkers/unsupported_version.py
@@ -18,7 +18,6 @@ from pylint.checkers.utils import (
safe_infer,
uninferable_final_decorators,
)
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -29,7 +28,6 @@ class UnsupportedVersionChecker(BaseChecker):
indicated by the py-version setting.
"""
- __implements__ = (IAstroidChecker,)
name = "unsupported_version"
msgs = {
"W2601": (
diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py
index cc25fd479..38100e135 100644
--- a/pylint/checkers/utils.py
+++ b/pylint/checkers/utils.py
@@ -435,7 +435,7 @@ def only_required_for_messages(
method or not. If none of the messages is enabled, the method will be skipped.
Therefore, the list of messages must be well maintained at all times!
This decorator only has an effect on ``visit_*`` and ``leave_*`` methods
- of a class inheriting from ``BaseChecker`` and implementing ``IAstroidChecker``.
+ of a class inheriting from ``BaseChecker``.
"""
def store_messages(func):
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 33743598b..1a84b7396 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -27,13 +27,7 @@ from pylint.checkers.utils import (
is_postponed_evaluation_enabled,
)
from pylint.constants import PY39_PLUS, TYPING_TYPE_CHECKS_GUARDS
-from pylint.interfaces import (
- CONTROL_FLOW,
- HIGH,
- INFERENCE,
- INFERENCE_FAILURE,
- IAstroidChecker,
-)
+from pylint.interfaces import CONTROL_FLOW, HIGH, INFERENCE, INFERENCE_FAILURE
if sys.version_info >= (3, 8):
from functools import cached_property
@@ -971,8 +965,6 @@ class VariablesChecker(BaseChecker):
* self/cls assignment
"""
- __implements__ = IAstroidChecker
-
name = "variables"
msgs = MSGS
options = (
diff --git a/pylint/extensions/bad_builtin.py b/pylint/extensions/bad_builtin.py
index dfdaf2f4d..9d15be6df 100644
--- a/pylint/extensions/bad_builtin.py
+++ b/pylint/extensions/bad_builtin.py
@@ -12,7 +12,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -25,7 +24,6 @@ BUILTIN_HINTS["filter"] = BUILTIN_HINTS["map"]
class BadBuiltinChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "deprecated_builtins"
msgs = {
"W0141": (
diff --git a/pylint/extensions/broad_try_clause.py b/pylint/extensions/broad_try_clause.py
index 4ce2796e7..dd082862f 100644
--- a/pylint/extensions/broad_try_clause.py
+++ b/pylint/extensions/broad_try_clause.py
@@ -10,7 +10,7 @@ from typing import TYPE_CHECKING
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -25,8 +25,6 @@ class BroadTryClauseChecker(checkers.BaseChecker):
"""
- __implements__ = interfaces.IAstroidChecker
-
# configuration section name
name = "broad_try_clause"
msgs = {
diff --git a/pylint/extensions/check_elif.py b/pylint/extensions/check_elif.py
index 23b975c3d..8652d1ac7 100644
--- a/pylint/extensions/check_elif.py
+++ b/pylint/extensions/check_elif.py
@@ -11,7 +11,7 @@ from astroid import nodes
from pylint.checkers import BaseTokenChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import HIGH, IAstroidChecker
+from pylint.interfaces import HIGH
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -20,7 +20,6 @@ if TYPE_CHECKING:
class ElseifUsedChecker(BaseTokenChecker):
"""Checks for use of "else if" when an "elif" could be used."""
- __implements__ = IAstroidChecker
name = "else_if_used"
msgs = {
"R5501": (
diff --git a/pylint/extensions/code_style.py b/pylint/extensions/code_style.py
index 566c4a1b8..3edc407a9 100644
--- a/pylint/extensions/code_style.py
+++ b/pylint/extensions/code_style.py
@@ -11,7 +11,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker, utils
from pylint.checkers.utils import check_messages, safe_infer
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -38,8 +37,6 @@ class CodeStyleChecker(BaseChecker):
3. Everything else should go into another extension
"""
- __implements__ = (IAstroidChecker,)
-
name = "code_style"
msgs = {
"R6101": (
diff --git a/pylint/extensions/comparetozero.py b/pylint/extensions/comparetozero.py
index 4f73f2554..7dbac5382 100644
--- a/pylint/extensions/comparetozero.py
+++ b/pylint/extensions/comparetozero.py
@@ -13,7 +13,7 @@ from typing import TYPE_CHECKING, Any
import astroid
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
if TYPE_CHECKING:
@@ -32,8 +32,6 @@ class CompareToZeroChecker(checkers.BaseChecker):
different meaning than None!
"""
- __implements__ = (interfaces.IAstroidChecker,)
-
# configuration section name
name = "compare-to-zero"
msgs = {
diff --git a/pylint/extensions/comparison_placement.py b/pylint/extensions/comparison_placement.py
index df2a9642d..77ddb2dd7 100644
--- a/pylint/extensions/comparison_placement.py
+++ b/pylint/extensions/comparison_placement.py
@@ -13,7 +13,6 @@ from typing import TYPE_CHECKING
from astroid import nodes
from pylint.checkers import BaseChecker, utils
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -25,8 +24,6 @@ COMPARISON_OPERATORS = frozenset(("==", "!=", "<", ">", "<=", ">="))
class MisplacedComparisonConstantChecker(BaseChecker):
"""Checks the placement of constants in comparisons."""
- __implements__ = (IAstroidChecker,)
-
# configuration section name
name = "comparison-placement"
msgs = {
diff --git a/pylint/extensions/confusing_elif.py b/pylint/extensions/confusing_elif.py
index 133804996..d081848f4 100644
--- a/pylint/extensions/confusing_elif.py
+++ b/pylint/extensions/confusing_elif.py
@@ -10,7 +10,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -19,8 +18,6 @@ if TYPE_CHECKING:
class ConfusingConsecutiveElifChecker(BaseChecker):
"""Checks if "elif" is used right after an indented block that finishes with "if" or "elif" itself."""
- __implements__ = IAstroidChecker
-
name = "confusing_elif"
msgs = {
"R5601": (
diff --git a/pylint/extensions/consider_ternary_expression.py b/pylint/extensions/consider_ternary_expression.py
index 77070d848..c549b550f 100644
--- a/pylint/extensions/consider_ternary_expression.py
+++ b/pylint/extensions/consider_ternary_expression.py
@@ -11,7 +11,6 @@ from typing import TYPE_CHECKING
from astroid import nodes
from pylint.checkers import BaseChecker
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -19,7 +18,6 @@ if TYPE_CHECKING:
class ConsiderTernaryExpressionChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "consider_ternary_expression"
msgs = {
"W0160": (
diff --git a/pylint/extensions/docparams.py b/pylint/extensions/docparams.py
index 519db42ba..04131a876 100644
--- a/pylint/extensions/docparams.py
+++ b/pylint/extensions/docparams.py
@@ -16,7 +16,6 @@ from pylint.checkers import BaseChecker
from pylint.checkers import utils as checker_utils
from pylint.extensions import _check_docs_utils as utils
from pylint.extensions._check_docs_utils import Docstring
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -43,8 +42,6 @@ class DocstringParameterChecker(BaseChecker):
to the ``MASTER`` section of your ``.pylintrc``.
"""
- __implements__ = IAstroidChecker
-
name = "parameter_documentation"
msgs = {
"W9005": (
diff --git a/pylint/extensions/docstyle.py b/pylint/extensions/docstyle.py
index 457903bb1..1cab2656a 100644
--- a/pylint/extensions/docstyle.py
+++ b/pylint/extensions/docstyle.py
@@ -11,7 +11,7 @@ from astroid import nodes
from pylint import checkers
from pylint.checkers.utils import check_messages
-from pylint.interfaces import HIGH, IAstroidChecker
+from pylint.interfaces import HIGH
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -20,7 +20,6 @@ if TYPE_CHECKING:
class DocStringStyleChecker(checkers.BaseChecker):
"""Checks format of docstrings based on PEP 0257."""
- __implements__ = IAstroidChecker
name = "docstyle"
msgs = {
diff --git a/pylint/extensions/emptystring.py b/pylint/extensions/emptystring.py
index 795689703..628bee54c 100644
--- a/pylint/extensions/emptystring.py
+++ b/pylint/extensions/emptystring.py
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Any
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
if TYPE_CHECKING:
@@ -27,8 +27,6 @@ class CompareToEmptyStringChecker(checkers.BaseChecker):
and has a different meaning than None!
"""
- __implements__ = (interfaces.IAstroidChecker,)
-
# configuration section name
name = "compare-to-empty-string"
msgs = {
diff --git a/pylint/extensions/eq_without_hash.py b/pylint/extensions/eq_without_hash.py
index 9cbbb5452..b009da908 100644
--- a/pylint/extensions/eq_without_hash.py
+++ b/pylint/extensions/eq_without_hash.py
@@ -18,7 +18,6 @@ from pylint.lint import PyLinter
class EqWithoutHash(checkers.BaseChecker):
- __implements__ = interfaces.IAstroidChecker
name = "eq-without-hash"
msgs = {
diff --git a/pylint/extensions/for_any_all.py b/pylint/extensions/for_any_all.py
index ed57d3955..cadd368ac 100644
--- a/pylint/extensions/for_any_all.py
+++ b/pylint/extensions/for_any_all.py
@@ -12,7 +12,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages, returns_bool
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint.pylinter import PyLinter
@@ -20,7 +19,6 @@ if TYPE_CHECKING:
class ConsiderUsingAnyOrAllChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "consider-using-any-or-all"
msgs = {
"C0501": (
diff --git a/pylint/extensions/mccabe.py b/pylint/extensions/mccabe.py
index 26094e374..2eb7f1afa 100644
--- a/pylint/extensions/mccabe.py
+++ b/pylint/extensions/mccabe.py
@@ -14,7 +14,7 @@ from mccabe import PathGraphingAstVisitor as Mccabe_PathGraphingAstVisitor
from pylint import checkers
from pylint.checkers.utils import check_messages
-from pylint.interfaces import HIGH, IAstroidChecker
+from pylint.interfaces import HIGH
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -148,7 +148,6 @@ class McCabeMethodChecker(checkers.BaseChecker):
to validate a too complex code.
"""
- __implements__ = IAstroidChecker
name = "design"
msgs = {
diff --git a/pylint/extensions/overlapping_exceptions.py b/pylint/extensions/overlapping_exceptions.py
index 97fddaec4..d8a4a450a 100644
--- a/pylint/extensions/overlapping_exceptions.py
+++ b/pylint/extensions/overlapping_exceptions.py
@@ -11,7 +11,7 @@ from typing import TYPE_CHECKING, Any
import astroid
from astroid import nodes
-from pylint import checkers, interfaces
+from pylint import checkers
from pylint.checkers import utils
from pylint.checkers.exceptions import _annotated_unpack_infer
@@ -26,8 +26,6 @@ class OverlappingExceptionsChecker(checkers.BaseChecker):
(i.e. overlapping).
"""
- __implements__ = interfaces.IAstroidChecker
-
name = "overlap-except"
msgs = {
"W0714": (
diff --git a/pylint/extensions/private_import.py b/pylint/extensions/private_import.py
index 6ab17e574..704f98963 100644
--- a/pylint/extensions/private_import.py
+++ b/pylint/extensions/private_import.py
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING
from astroid import nodes
from pylint.checkers import BaseChecker, utils
-from pylint.interfaces import HIGH, IAstroidChecker
+from pylint.interfaces import HIGH
if TYPE_CHECKING:
from pylint.lint.pylinter import PyLinter
@@ -20,7 +20,6 @@ if TYPE_CHECKING:
class PrivateImportChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "import-private-name"
msgs = {
"C2701": (
diff --git a/pylint/extensions/redefined_variable_type.py b/pylint/extensions/redefined_variable_type.py
index b3ce07e46..1497b53ff 100644
--- a/pylint/extensions/redefined_variable_type.py
+++ b/pylint/extensions/redefined_variable_type.py
@@ -10,7 +10,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages, is_none, node_type
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -30,8 +29,6 @@ class MultipleTypesChecker(BaseChecker):
str.split()
"""
- __implements__ = IAstroidChecker
-
name = "multiple_types"
msgs = {
"R0204": (
diff --git a/pylint/extensions/set_membership.py b/pylint/extensions/set_membership.py
index 540467956..3adad090a 100644
--- a/pylint/extensions/set_membership.py
+++ b/pylint/extensions/set_membership.py
@@ -10,7 +10,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -18,8 +17,6 @@ if TYPE_CHECKING:
class SetMembershipChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
-
name = "set_membership"
msgs = {
"R6201": (
diff --git a/pylint/extensions/typing.py b/pylint/extensions/typing.py
index 258f4a4b2..4334fb54f 100644
--- a/pylint/extensions/typing.py
+++ b/pylint/extensions/typing.py
@@ -17,7 +17,7 @@ from pylint.checkers.utils import (
is_postponed_evaluation_enabled,
safe_infer,
)
-from pylint.interfaces import INFERENCE, IAstroidChecker
+from pylint.interfaces import INFERENCE
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -93,8 +93,6 @@ class DeprecatedTypingAliasMsg(NamedTuple):
class TypingChecker(BaseChecker):
"""Find issue specifically related to type annotations."""
- __implements__ = (IAstroidChecker,)
-
name = "typing"
msgs = {
"W6001": (
diff --git a/pylint/extensions/while_used.py b/pylint/extensions/while_used.py
index 1be054810..51180b831 100644
--- a/pylint/extensions/while_used.py
+++ b/pylint/extensions/while_used.py
@@ -12,7 +12,6 @@ from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -20,7 +19,6 @@ if TYPE_CHECKING:
class WhileChecker(BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "while_used"
msgs = {
"W0149": (
diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py
index e774a2b42..e1a04c1ae 100644
--- a/pylint/lint/pylinter.py
+++ b/pylint/lint/pylinter.py
@@ -1002,8 +1002,6 @@ class PyLinter(
walker.walk(node)
return True
- # IAstroidChecker interface #################################################
-
def open(self):
"""Initialize counters."""
self.stats = LinterStats()
diff --git a/tests/checkers/unittest_deprecated.py b/tests/checkers/unittest_deprecated.py
index 0cd71dda9..a90e64ed8 100644
--- a/tests/checkers/unittest_deprecated.py
+++ b/tests/checkers/unittest_deprecated.py
@@ -7,12 +7,11 @@ from __future__ import annotations
import astroid
from pylint.checkers import BaseChecker, DeprecatedMixin
-from pylint.interfaces import UNDEFINED, IAstroidChecker
+from pylint.interfaces import UNDEFINED
from pylint.testutils import CheckerTestCase, MessageTest
class _DeprecatedChecker(DeprecatedMixin, BaseChecker):
- __implements__ = (IAstroidChecker,)
name = "deprecated"
def deprecated_methods(self) -> set[str]:
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py
index 97a9220cd..4b738b76f 100644
--- a/tests/lint/unittest_lint.py
+++ b/tests/lint/unittest_lint.py
@@ -190,7 +190,6 @@ def initialized_linter(linter: PyLinter) -> PyLinter:
def test_pylint_visit_method_taken_in_account(linter: PyLinter) -> None:
class CustomChecker(checkers.BaseChecker):
- __implements__ = interfaces.IAstroidChecker
name = "custom"
msgs = {"W9999": ("", "custom", "")}