diff options
Diffstat (limited to 'gui.py')
-rw-r--r-- | gui.py | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -318,7 +318,12 @@ class LintGui: #clear the window self.lbMessages.delete(0, END) for msg in self.msgs: - if (self.msg_type_dict.get(msg[0])()): + + # Obtaining message type (pylint's '--include-ids' appends the + # ID to this letter, so 1 character long is not guaranteed) + msg_type = msg[0][0] + + if (self.msg_type_dict.get(msg_type)()): msg_str = convert_to_string(msg) self.lbMessages.insert(END, msg_str) fg_color = COLORS.get(msg_str[:3], 'black') @@ -346,8 +351,12 @@ class LintGui: #adding message to list of msgs self.msgs.append(msg) + # Obtaining message type (pylint's '--include-ids' appends the + # ID to this letter, so 1 character long is not guaranteed) + msg_type = msg[0][0] + #displaying msg if message type is selected in check box - if (self.msg_type_dict.get(msg[0])()): + if (self.msg_type_dict.get(msg_type)()): msg_str = convert_to_string(msg) self.lbMessages.insert(END, msg_str) fg_color = COLORS.get(msg_str[:3], 'black') |