Plugins/CheckerPlugins/Pep8/Pep8Checker.py

changeset 2896
9fa71ee50b3d
parent 2864
d973dab8b715
child 2917
fe82710d02cb
--- a/Plugins/CheckerPlugins/Pep8/Pep8Checker.py	Mon Sep 09 18:43:23 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep8Checker.py	Mon Sep 09 19:25:46 2013 +0200
@@ -12,6 +12,7 @@
 from PyQt4.QtCore import QProcess, QCoreApplication
 
 from . import pep8
+from .Pep8NamingChecker import Pep8NamingChecker
 
 import Preferences
 import Utilities
@@ -37,7 +38,8 @@
         @keyparam ignore list of message IDs to ignore
             (comma separated string)
         @keyparam max_line_length maximum allowed line length (integer)
-        @keyparam hang_closing flag indicating to allow hanging closing brackets (boolean)
+        @keyparam hang_closing flag indicating to allow hanging closing
+            brackets (boolean)
         """
         self.errors = []
         self.counters = {}
@@ -102,7 +104,10 @@
                     argindex += 1
                 index += 6 + arglen
                 
-                text = pep8.getMessage(code, *args)
+                if code in Pep8NamingChecker.Codes:
+                    text = Pep8NamingChecker.getMessage(code, *args)
+                else:
+                    text = pep8.getMessage(code, *args)
                 self.errors.append((fname, lineno, position, text))
             while index < len(output):
                 code, countStr = output[index].split(None, 1)

eric ide

mercurial