Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3046
c481f2a33b16
child 3065
070b35dde35e
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri Nov 01 15:48:48 2013 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sun Nov 03 15:58:22 2013 +0100
@@ -132,7 +132,7 @@
         """
         self.resultList.sortItems(self.resultList.sortColumn(),
                                   self.resultList.header().sortIndicatorOrder()
-                                 )
+                                  )
     
     def __createResultItem(self, file, line, pos, message, fixed, autofixing):
         """
@@ -348,10 +348,10 @@
                     [f for f in files
                      if not fnmatch.fnmatch(f, filter.strip())]
         
-        py3files = [f for f in files \
+        py3files = [f for f in files
                     if f.endswith(
                         tuple(Preferences.getPython("Python3Extensions")))]
-        py2files = [f for f in files \
+        py2files = [f for f in files
                     if f.endswith(
                         tuple(Preferences.getPython("PythonExtensions")))]
         
@@ -398,8 +398,8 @@
                         self.noResults = False
                         self.__createResultItem(
                             file, 1, 1,
-                            self.trUtf8("Error: {0}").format(str(msg))\
-                                .rstrip()[1:-1], False, False)
+                            self.trUtf8("Error: {0}").format(str(msg))
+                            .rstrip()[1:-1], False, False)
                         progress += 1
                         continue
                     
@@ -416,10 +416,10 @@
                     if ("FileType" in flags and
                         flags["FileType"] in ["Python", "Python2"]) or \
                        file in py2files or \
-                       (ext in [".py", ".pyw"] and \
-                        Preferences.getProject("DeterminePyFromProject") and \
-                        self.__project.isOpen() and \
-                        self.__project.isProjectFile(file) and \
+                       (ext in [".py", ".pyw"] and
+                        Preferences.getProject("DeterminePyFromProject") and
+                        self.__project.isOpen() and
+                        self.__project.isProjectFile(file) and
                         self.__project.getProjectLanguage() in ["Python",
                                                                 "Python2"]):
                         from .CodeStyleChecker import CodeStyleCheckerPy2
@@ -436,12 +436,12 @@
                         stats.update(report.counters)
                     else:
                         if includeMessages:
-                            select = [s.strip() for s in 
+                            select = [s.strip() for s in
                                       includeMessages.split(',') if s.strip()]
                         else:
                             select = []
                         if excludeMessages:
-                            ignore = [i.strip() for i in 
+                            ignore = [i.strip() for i in
                                       excludeMessages.split(',') if i.strip()]
                         else:
                             ignore = []
@@ -685,7 +685,8 @@
                 citm = itm.child(cindex)
                 lineno = citm.data(0, self.lineRole)
                 message = citm.data(0, self.messageRole)
-                editor.toggleFlakesWarning(lineno, True, message)
+                editor.toggleFlakesWarning(
+                    lineno, True, message, warningType=editor.WarningStyle)
         
         # go through the list again to clear warning markers for files,
         # that are ok
@@ -825,7 +826,7 @@
             fixesDict[filename].append((
                 (itm.data(0, self.lineRole),
                  itm.data(0, self.positionRole),
-                 "{0} {1}".format(itm.data(0, self.codeRole), 
+                 "{0} {1}".format(itm.data(0, self.codeRole),
                                   itm.data(0, self.messageRole))),
                 itm
             ))

eric ide

mercurial