summaryrefslogtreecommitdiff
path: root/pylint/checkers/deprecated.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/deprecated.py')
-rw-r--r--pylint/checkers/deprecated.py37
1 files changed, 27 insertions, 10 deletions
diff --git a/pylint/checkers/deprecated.py b/pylint/checkers/deprecated.py
index ea33ff6bc..78d73586b 100644
--- a/pylint/checkers/deprecated.py
+++ b/pylint/checkers/deprecated.py
@@ -31,31 +31,48 @@ class DeprecatedMixin(BaseChecker):
A class implementing mixin must define "deprecated-method" Message.
"""
- msgs: dict[str, MessageDefinitionTuple] = {
- "W1505": (
+ DEPRECATED_MODULE_MESSAGE: dict[str, MessageDefinitionTuple] = {
+ "W4901": (
+ "Deprecated module %r",
+ "deprecated-module",
+ "A module marked as deprecated is imported.",
+ {"old_names": [("W0402", "old-deprecated-module")], "shared": True},
+ ),
+ }
+
+ DEPRECATED_METHOD_MESSAGE: dict[str, MessageDefinitionTuple] = {
+ "W4902": (
"Using deprecated method %s()",
"deprecated-method",
"The method is marked as deprecated and will be removed in the future.",
+ {"old_names": [("W1505", "old-deprecated-method")], "shared": True},
),
- "W1511": (
+ }
+
+ DEPRECATED_ARGUMENT_MESSAGE: dict[str, MessageDefinitionTuple] = {
+ "W4903": (
"Using deprecated argument %s of method %s()",
"deprecated-argument",
"The argument is marked as deprecated and will be removed in the future.",
+ {"old_names": [("W1511", "old-deprecated-argument")], "shared": True},
),
- "W0402": (
- "Deprecated module %r",
- "deprecated-module",
- "A module marked as deprecated is imported.",
- ),
- "W1512": (
+ }
+
+ DEPRECATED_CLASS_MESSAGE: dict[str, MessageDefinitionTuple] = {
+ "W4904": (
"Using deprecated class %s of module %s",
"deprecated-class",
"The class is marked as deprecated and will be removed in the future.",
+ {"old_names": [("W1512", "old-deprecated-class")], "shared": True},
),
- "W1513": (
+ }
+
+ DEPRECATED_DECORATOR_MESSAGE: dict[str, MessageDefinitionTuple] = {
+ "W4905": (
"Using deprecated decorator %s()",
"deprecated-decorator",
"The decorator is marked as deprecated and will be removed in the future.",
+ {"old_names": [("W1513", "old-deprecated-decorator")], "shared": True},
),
}