summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2019-06-28 22:35:28 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-08-06 16:39:31 +0200
commitb21bcd77f77d78cc9dd9dc3ca3ad30c00d7cc159 (patch)
treefb011579af8d0bc2caf6ca2f6c35985035e2f26f
parentc1fe6e175f80df385129aa77ad363009b22f8089 (diff)
downloadpylint-git-b21bcd77f77d78cc9dd9dc3ca3ad30c00d7cc159.tar.gz
[pylint.message] category_id does not need to be a function
-rw-r--r--pylint/message/message_handler_mix_in.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/pylint/message/message_handler_mix_in.py b/pylint/message/message_handler_mix_in.py
index 20e2116ae..912e76e92 100644
--- a/pylint/message/message_handler_mix_in.py
+++ b/pylint/message/message_handler_mix_in.py
@@ -95,15 +95,11 @@ class MessagesHandlerMixIn:
return
# msgid is a category?
- def category_id(cid):
- cid = cid.upper()
- if cid in MSG_TYPES:
- return cid
- return MSG_TYPES_LONG.get(cid)
-
- catid = category_id(msgid)
- if catid is not None:
- for _msgid in self.msgs_store._msgs_by_category.get(catid):
+ category_id = msgid.upper()
+ if category_id not in MSG_TYPES:
+ category_id = MSG_TYPES_LONG.get(category_id)
+ if category_id is not None:
+ for _msgid in self.msgs_store._msgs_by_category.get(category_id):
self._set_msg_status(_msgid, enable, scope, line)
return