diff -r 61a1757626ac -r 3750abc45d5e src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py --- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py Mon May 22 08:46:00 2023 +0200 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py Mon May 22 09:07:37 2023 +0200 @@ -581,7 +581,7 @@ if AstUtilities.isString(annotationNode): try: annotationNode = ast.parse(annotationNode.s).body[0].value - except (SyntaxError, IndexError): + except (IndexError, SyntaxError): return defaultComplexity complexity = defaultComplexity @@ -617,7 +617,7 @@ if AstUtilities.isString(annotationNode): try: annotationNode = ast.parse(annotationNode.s).body[0].value - except (SyntaxError, IndexError): + except (IndexError, SyntaxError): return annotationLength if isinstance(annotationNode, ast.Subscript):