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

changeset 8236
695777f04b25
parent 8222
5994b80b8760
child 8244
ed8cb108b27b
diff -r 78e6d29eb773 -r 695777f04b25 eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py	Tue Apr 13 19:59:17 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py	Wed Apr 14 17:34:27 2021 +0200
@@ -226,7 +226,7 @@
     """
     Class implementing a node visitor to check function annotations.
     
-    Note: this class is modelled after flake8-annotations checker.
+    Note: this class is modeled after flake8-annotations checker.
     """
     def __init__(self, sourceLines):
         """
@@ -427,8 +427,6 @@
     """
     if AstUtilities.isString(annotationNode):
         annotationNode = ast.parse(annotationNode.s).body[0].value
-    if isinstance(annotationNode, ast.Subscript):
-        return 1 + getAnnotationComplexity(annotationNode.slice.value)
     if isinstance(annotationNode, ast.Tuple):
         return max(getAnnotationComplexity(n) for n in annotationNode.elts)
     return 1

eric ide

mercurial