eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCodeSelectionDialog.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8218
7c09585bd960
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCodeSelectionDialog.py	Fri Apr 02 11:59:41 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCodeSelectionDialog.py	Sat May 01 14:27:20 2021 +0200
@@ -37,7 +37,7 @@
         @param parent reference to the parent widget
         @type QWidget
         """
-        super(CodeStyleCodeSelectionDialog, self).__init__(parent)
+        super().__init__(parent)
         self.setupUi(self)
         
         textWrapper = textwrap.TextWrapper(width=60)
@@ -45,7 +45,7 @@
         self.codeTable.headerItem().setText(self.codeTable.columnCount(), "")
         codeList = [code.strip() for code in codes.split(",") if code.strip()]
         if categories:
-            codeList = [code for code in codeList if not code[0] in categories]
+            codeList = [code for code in codeList if code[0] not in categories]
         
         if showFixCodes:
             from .CodeStyleFixer import FixableCodeStyleIssues
@@ -57,7 +57,7 @@
             if categories:
                 # filter by category
                 selectableCodes = [x for x in selectableCodes
-                                   if not x[0] in categories]
+                                   if x[0] not in categories]
         for code in sorted(selectableCodes):
             message = getTranslatedMessage(code, [], example=True)
             if message is None:
@@ -83,6 +83,8 @@
                 itm.setIcon(0, UI.PixmapCache.getIcon("securityLow"))
             elif code.startswith("P"):
                 itm.setIcon(0, UI.PixmapCache.getIcon("dirClosed"))
+            elif code.startswith("Y"):
+                itm.setIcon(0, UI.PixmapCache.getIcon("filePython"))
             else:
                 # unknown category prefix => warning
                 itm.setIcon(0, UI.PixmapCache.getIcon("warning"))

eric ide

mercurial