diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2019-03-10 11:01:29 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-08-06 16:38:21 +0200 |
commit | 3482d0b6b6b73c68aefea8c956c511e549f73f2a (patch) | |
tree | 308413b1fccb2ac421907d6dfe46bb622663f4c5 | |
parent | d7d6047704a6993c0d5cec6e1babbb3dbade69a6 (diff) | |
download | pylint-git-3482d0b6b6b73c68aefea8c956c511e549f73f2a.tar.gz |
[pylint.message] Clearer conditionnal msgid formatting
-rw-r--r-- | pylint/message/message_store.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pylint/message/message_store.py b/pylint/message/message_store.py index 2215ae867..8667d6694 100644 --- a/pylint/message/message_store.py +++ b/pylint/message/message_store.py @@ -151,13 +151,14 @@ class MessagesStore: def get_message_definitions(self, msgid_or_symbol: str) -> list: """Returns the Message object for this message. - :param str msgid_or_symbol: msgid_or_symbol may be either a numeric or symbolic id. :raises UnknownMessageError: if the message id is not defined. :rtype: List of MessageDefinition :return: A message definition corresponding to msgid_or_symbol """ - if msgid_or_symbol[1:].isdigit(): + # Only msgid can have a digit as second letter + is_msgid = msgid_or_symbol[1:].isdigit() + if is_msgid: msgid_or_symbol = msgid_or_symbol.upper() for source in (self._alternative_names, self._messages_definitions): try: |