eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py

changeset 7246
c32a350d2414
parent 7242
799f9ec0d4e6
child 7247
bf9379f964f3
diff -r b47179fbb9d8 -r c32a350d2414 eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py	Tue Sep 17 19:43:17 2019 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py	Wed Sep 18 20:25:52 2019 +0200
@@ -344,7 +344,14 @@
         errors += complexityChecker.errors
         
         # check function annotations
-        # TODO: implement function annotation checker (see flake8-annotations)
+        if sys.version_info >= (3, 5, 0):
+            # annotations are supported from Python 3.5 on
+            from AnnotationsChecker import AnnotationsChecker
+            annotationsChecker = AnnotationsChecker(
+                source, filename, select, ignore, [], repeatMessages)
+            annotationsChecker.run()
+            stats.update(annotationsChecker.counters)
+            errors += annotationsChecker.errors
     
     errorsDict = {}
     for _fname, lineno, position, text in errors:

eric ide

mercurial