Fix for an issue with the latest pyflakes changes.

Sat, 18 Jan 2014 14:49:00 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 18 Jan 2014 14:49:00 +0100
changeset 3211
bb350913a76a
parent 3210
8f4fe6f76729
child 3212
27a73942b8c8

Fix for an issue with the latest pyflakes changes.

Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
diff -r 8f4fe6f76729 -r bb350913a76a Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Thu Jan 16 18:45:45 2014 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Sat Jan 18 14:49:00 2014 +0100
@@ -268,11 +268,18 @@
                                 self.__createResultItem(
                                     err.filename, err.lineno, 0, msg, "")
                         else:
+                            from Utilities.pyflakes.translations import \
+                                getTranslatedFlakesMessage
                             for warning in warnings:
                                 self.noResults = False
+                                if len(warning[2]) == 3:
+                                    msg = getTranslatedFlakesMessage(
+                                        warning[2], warning[3])
+                                else:
+                                    msg = warning[2]
                                 self.__createResultItem(
                                     warning[0], int(warning[1]), 0,
-                                    warning[2], "", isWarning=True)
+                                    msg, "", isWarning=True)
                 progress += 1
             self.checkProgress.setValue(progress)
             self.checkProgressLabel.setPath("")
diff -r 8f4fe6f76729 -r bb350913a76a QScintilla/Editor.py
--- a/QScintilla/Editor.py	Thu Jan 16 18:45:45 2014 +0100
+++ b/QScintilla/Editor.py	Sat Jan 18 14:49:00 2014 +0100
@@ -5046,9 +5046,12 @@
                     from Utilities.pyflakes.translations import \
                         getTranslatedFlakesMessage
                     for warning in warnings:
-                        self.toggleWarning(
-                            int(warning[1]), True, getTranslatedFlakesMessage(
-                                warning[2], warning[3]))
+                        if len(warning[2]) == 3:
+                            msg = getTranslatedFlakesMessage(warning[2],
+                                                             warning[3])
+                        else:
+                            msg = warning[2]
+                        self.toggleWarning(int(warning[1]), True, msg)
         
     def __initOnlineSyntaxCheck(self):
         """

eric ide

mercurial