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

branch
eric7
changeset 10170
6cf1ee737d8f
parent 10169
0f70a4ef4592
child 10439
21c28b0f9e41
equal deleted inserted replaced
10169:0f70a4ef4592 10170:6cf1ee737d8f
571 """ 571 """
572 if node.value is not None: 572 if node.value is not None:
573 # In the event of an explicit `None` return (`return None`), the 573 # In the event of an explicit `None` return (`return None`), the
574 # node body will be an instance `ast.Constant` (3.8+), which we 574 # node body will be an instance `ast.Constant` (3.8+), which we
575 # need to check to see if it's actually `None` 575 # need to check to see if it's actually `None`
576 if ( 576 if isinstance(node.value, ast.Constant) and node.value.value is None:
577 isinstance(node.value, ast.Constant)
578 and node.value.value is None
579 ):
580 return 577 return
581 578
582 self.__nonNoneReturnNodes.add(self.__context[-1]) 579 self.__nonNoneReturnNodes.add(self.__context[-1])
583 580
584 def switchContext(self, node): 581 def switchContext(self, node):

eric ide

mercurial