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

branch
eric7
changeset 10169
0f70a4ef4592
parent 10119
64147a7e6393
child 10170
6cf1ee737d8f
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsFunctionVisitor.py	Tue Aug 29 16:55:01 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsFunctionVisitor.py	Tue Aug 29 16:55:18 2023 +0200
@@ -571,11 +571,10 @@
         """
         if node.value is not None:
             # In the event of an explicit `None` return (`return None`), the
-            # node body will be an instance of either `ast.Constant` (3.8+) or
-            # `ast.NameConstant`, which we need to check to see if it's
-            # actually `None`
+            # node body will be an instance `ast.Constant` (3.8+), which we
+            # need to check to see if it's actually `None`
             if (
-                isinstance(node.value, (ast.Constant, ast.NameConstant))
+                isinstance(node.value, ast.Constant)
                 and node.value.value is None
             ):
                 return

eric ide

mercurial