summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/deprecation_checker.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/deprecation_checker.py b/examples/deprecation_checker.py
index 52244edf6..6fb21eedd 100644
--- a/examples/deprecation_checker.py
+++ b/examples/deprecation_checker.py
@@ -51,14 +51,20 @@ if TYPE_CHECKING:
class DeprecationChecker(DeprecatedMixin, BaseChecker):
"""Class implementing deprecation checker."""
- # DeprecationMixin class is Mixin class implementing logic for searching deprecated methods and functions.
- # The list of deprecated methods/functions is defined by implementing class via deprecated_methods callback.
+ # DeprecatedMixin class is Mixin class implementing logic for searching deprecated methods and functions.
+ # The list of deprecated methods/functions is defined by the implementing class via deprecated_methods callback.
# DeprecatedMixin class is overriding attributes of BaseChecker hence must be specified *before* BaseChecker
# in list of base classes.
# The name defines a custom section of the config for this checker.
name = "deprecated"
+ # Register messages emitted by the checker.
+ msgs = {
+ **DeprecatedMixin.DEPRECATED_METHOD_MESSAGE,
+ **DeprecatedMixin.DEPRECATED_ARGUMENT_MESSAGE,
+ }
+
def deprecated_methods(self) -> set[str]:
"""Callback method called by DeprecatedMixin for every method/function found in the code.