eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8236
695777f04b25
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py	Sun Apr 11 18:45:10 2021 +0200
@@ -371,14 +371,13 @@
         @type str
         """
         # check class method issues
-        if methodType != "function":
-            if argNode.arg in ("cls", "self"):
-                if methodType == "classmethod":
-                    self.issues.append((argNode, "A102"))
-                    return
-                elif methodType != "staticmethod":
-                    self.issues.append((argNode, "A101"))
-                    return
+        if methodType != "function" and argNode.arg in ("cls", "self"):
+            if methodType == "classmethod":
+                self.issues.append((argNode, "A102"))
+                return
+            elif methodType != "staticmethod":
+                self.issues.append((argNode, "A101"))
+                return
         
         # check all other arguments
         if argType == "kwarg":

eric ide

mercurial