Plugins/CheckerPlugins/Pep8/Pep8NamingChecker.py

changeset 2895
4a44d92757f9
parent 2894
8e4264045fc9
child 2905
a1ae4b297bc0
--- a/Plugins/CheckerPlugins/Pep8/Pep8NamingChecker.py	Sun Sep 08 13:16:07 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep8NamingChecker.py	Mon Sep 09 18:43:23 2013 +0200
@@ -313,10 +313,15 @@
                 return
         
         argNames = self.__getArgNames(node)
+        functionType = getattr(node, "function_type", "function")
+        
         if not argNames:
+            if functionType == "method":
+                yield self.__error(node, "N805")
+            elif functionType == "classmethod":
+                yield self.__error(node, "N804")
             return
         
-        functionType = getattr(node, "function_type", "function")
         if functionType == "method":
             if argNames[0] != "self":
                 yield self.__error(node, "N805")

eric ide

mercurial