eric6/Plugins/PluginCodeStyleChecker.py

changeset 7610
df7025fe26a3
parent 7360
9190402e4505
child 7613
382f89c11e27
--- a/eric6/Plugins/PluginCodeStyleChecker.py	Thu Jun 04 17:57:20 2020 +0200
+++ b/eric6/Plugins/PluginCodeStyleChecker.py	Sat Jun 06 19:42:15 2020 +0200
@@ -222,11 +222,13 @@
         """
         Private slot called after perfoming a style check on one file.
         
-        @param fn filename of the just checked file (str)
-        @param codeStyleCheckerStats stats of style and name check (dict)
-        @param results tuple for each found violation of style (tuple of
-            lineno (int), position (int), text (str), fixed (bool),
-            autofixing (bool), fixedMsg (str))
+        @param fn filename of the just checked file
+        @type str
+        @param codeStyleCheckerStats stats of style and name check
+        @type dict
+        @param results dictionary containing the check result data
+            (see CodesStyleChecker.__checkCodeStyle for details)
+        @type dict
         """
         from CheckerPlugins.CodeStyleChecker.translations import (
             getTranslatedMessage
@@ -234,17 +236,17 @@
         
         fixes = 0
         for result in results:
-            msg = getTranslatedMessage(result[2])
+            msg = getTranslatedMessage(result["code"], result["args"])
         
-            fixedMsg = result.pop()
-            if fixedMsg:
+            if result["fixcode"]:
                 fixes += 1
-                trFixedMsg = getTranslatedMessage(fixedMsg)
+                trFixedMsg = getTranslatedMessage(result["fixcode"],
+                                                  result["fixargs"])
                 
                 msg += "\n" + QCoreApplication.translate(
                     'CodeStyleCheckerDialog', "Fix: {0}").format(trFixedMsg)
             
-            result[2] = msg
+            result["display"] = msg
         self.styleChecked.emit(fn, codeStyleCheckerStats, fixes, results)
 
     def activate(self):

eric ide

mercurial