src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py

branch
eric7
changeset 10169
0f70a4ef4592
parent 10119
64147a7e6393
child 10184
af82cb6e0298
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py	Tue Aug 29 16:55:01 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py	Tue Aug 29 16:55:18 2023 +0200
@@ -570,7 +570,7 @@
         """
         if AstUtilities.isString(annotationNode):
             try:
-                annotationNode = ast.parse(annotationNode.s).body[0].value
+                annotationNode = ast.parse(annotationNode.value).body[0].value
             except (IndexError, SyntaxError):
                 return defaultComplexity
 
@@ -606,7 +606,7 @@
         annotationLength = 0
         if AstUtilities.isString(annotationNode):
             try:
-                annotationNode = ast.parse(annotationNode.s).body[0].value
+                annotationNode = ast.parse(annotationNode.value).body[0].value
             except (IndexError, SyntaxError):
                 return annotationLength
 

eric ide

mercurial