Changed code for AnnotationsChecker to fix an issue.

Wed, 14 Apr 2021 17:34:27 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 14 Apr 2021 17:34:27 +0200
changeset 8236
695777f04b25
parent 8235
78e6d29eb773
child 8237
acc1490f822e

Changed code for AnnotationsChecker to fix an issue.

eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py file | annotate | diff | comparison | revisions
--- 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