summaryrefslogtreecommitdiff
path: root/doc/exts
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-05-16 10:27:02 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-05-16 12:21:17 +0200
commit2075cf302c7945d96f8bb92d192234a111127f33 (patch)
tree54ccab81c3419764f95967a69146cb06ee166132 /doc/exts
parentb639956f8505d98e16bdf93ff2946a160afc2f3d (diff)
downloadpylint-git-2075cf302c7945d96f8bb92d192234a111127f33.tar.gz
[refactor] Factorize the message type in loop
Diffstat (limited to 'doc/exts')
-rw-r--r--doc/exts/pylint_messages.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/exts/pylint_messages.py b/doc/exts/pylint_messages.py
index f51696037..99dba0451 100644
--- a/doc/exts/pylint_messages.py
+++ b/doc/exts/pylint_messages.py
@@ -158,13 +158,13 @@ def _get_all_messages(
checker_module.__name__,
checker_module.__file__,
)
- messages_dict[MSG_TYPES_DOC[message.msgid[0]]].append(message_data)
-
+ msg_type = MSG_TYPES_DOC[message.msgid[0]]
+ messages_dict[msg_type].append(message_data)
if message.old_names:
for old_name in message.old_names:
category = MSG_TYPES_DOC[old_name[0][0]]
old_messages[category][(old_name[1], old_name[0])].append(
- (message.symbol, MSG_TYPES_DOC[message.msgid[0]])
+ (message.symbol, msg_type)
)
return messages_dict, old_messages