Plugins/CheckerPlugins/SyntaxChecker/pyflakes/checker.py

branch
5_5_x
changeset 3890
ca6201559906
parent 3544
431c842fd09a
equal deleted inserted replaced
3888:806d6229b636 3890:ca6201559906
698 # must be a Param context -- this only happens for names in function 698 # must be a Param context -- this only happens for names in function
699 # arguments, but these aren't dispatched through here 699 # arguments, but these aren't dispatched through here
700 raise RuntimeError("Got impossible expression context: %r" % (node.ctx,)) 700 raise RuntimeError("Got impossible expression context: %r" % (node.ctx,))
701 701
702 def RETURN(self, node): 702 def RETURN(self, node):
703 if node.value and not self.scope.returnValue: 703 if (
704 node.value and
705 hasattr(self.scope, 'returnValue') and
706 not self.scope.returnValue
707 ):
704 self.scope.returnValue = node.value 708 self.scope.returnValue = node.value
705 self.handleNode(node.value, node) 709 self.handleNode(node.value, node)
706 710
707 def YIELD(self, node): 711 def YIELD(self, node):
708 self.scope.isGenerator = True 712 self.scope.isGenerator = True

eric ide

mercurial