diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2018-12-09 21:31:31 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-08-06 16:38:21 +0200 |
commit | d7d6047704a6993c0d5cec6e1babbb3dbade69a6 (patch) | |
tree | f0a383d4c11e3813ab22a16ad9963cd536f20600 | |
parent | 8115a7ea80863bd6df47762811574cb06c4d0458 (diff) | |
download | pylint-git-d7d6047704a6993c0d5cec6e1babbb3dbade69a6.tar.gz |
[pylint.message] Remove MessageStore.add_renamed_message
It was only used in tests never in code.
-rw-r--r-- | pylint/message/message_store.py | 9 | ||||
-rw-r--r-- | tests/message/unittest_message_store.py | 17 |
2 files changed, 0 insertions, 26 deletions
diff --git a/pylint/message/message_store.py b/pylint/message/message_store.py index 32786f047..2215ae867 100644 --- a/pylint/message/message_store.py +++ b/pylint/message/message_store.py @@ -35,15 +35,6 @@ class MessagesStore: """The list of all active messages.""" return self._messages_definitions.values() - def add_renamed_message(self, old_id, old_symbol, new_symbol): - """Register the old ID and symbol for a warning that was renamed. - - This allows users to keep using the old ID/symbol in suppressions. - """ - message_definition = self.get_message_definitions(new_symbol)[0] - message_definition.old_names.append((old_id, old_symbol)) - self._register_alternative_name(message_definition, old_id, old_symbol) - def register_messages_from_checker(self, checker): """Register all messages from a checker. diff --git a/tests/message/unittest_message_store.py b/tests/message/unittest_message_store.py index 732cb7872..0ad0ff7c6 100644 --- a/tests/message/unittest_message_store.py +++ b/tests/message/unittest_message_store.py @@ -115,23 +115,6 @@ class TestMessagesStore(object): # cursory examination of the output: we're mostly testing it completes assert ":msg-symbol (W1234): *message*" in output.getvalue() - def test_add_renamed_message(self, store): - store.add_renamed_message("W1234", "old-bad-name", "msg-symbol") - assert "msg-symbol" == store.get_message_definitions("W1234")[0].symbol - assert "msg-symbol" == store.get_message_definitions("old-bad-name")[0].symbol - - def test_add_renamed_message_invalid(self, store): - # conflicting message ID - with pytest.raises(InvalidMessageError) as cm: - store.add_renamed_message( - "W1234", "old-msg-symbol", "duplicate-keyword-arg" - ) - expected = ( - "Message id 'W1234' cannot have both 'msg-symbol' and 'old-msg-symbol' " - "as symbolic name." - ) - assert str(cm.value) == expected - def test_renamed_message_register(self, store): assert "msg-symbol" == store.get_message_definitions("W0001")[0].symbol assert "msg-symbol" == store.get_message_definitions("old-symbol")[0].symbol |