diff options
author | clavedeluna <danalitovsky+git@gmail.com> | 2023-01-24 08:13:21 -0300 |
---|---|---|
committer | clavedeluna <danalitovsky+git@gmail.com> | 2023-01-24 08:13:21 -0300 |
commit | ca1b101606d7016fe84967fffd276dc5af7131fb (patch) | |
tree | 073f40f42ec65c7bb4e3c9e0d5ebf6447f8b0886 /pylint/checkers/base_checker.py | |
parent | 1d8d3fe8b16d93a6c228e904c9002836a23abf5f (diff) | |
download | pylint-git-ca1b101606d7016fe84967fffd276dc5af7131fb.tar.gz |
deprecate BaseChecker.get_message_definition
Diffstat (limited to 'pylint/checkers/base_checker.py')
-rw-r--r-- | pylint/checkers/base_checker.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pylint/checkers/base_checker.py b/pylint/checkers/base_checker.py index f44bf032a..1be0b972b 100644 --- a/pylint/checkers/base_checker.py +++ b/pylint/checkers/base_checker.py @@ -234,7 +234,15 @@ class BaseChecker(_ArgumentsProvider): for msgid, msg_tuple in sorted(self.msgs.items()) ] - def get_message_definition(self, msgid: str) -> MessageDefinition: + def get_message_definition( + self, msgid: str + ) -> MessageDefinition: # pragma: no cover + # TODO: 3.0: Remove deprecated method + warnings.warn( + "'get_message_definition' is deprecated and will be removed in 3.0.", + DeprecationWarning, + stacklevel=2, + ) for message_definition in self.messages: if message_definition.msgid == msgid: return message_definition |