Plugins/CheckerPlugins/SyntaxChecker/pyflakes/checker.py

changeset 3889
9357550095a1
parent 3670
f0cb7579c0b4
child 4021
195a471c327b
equal deleted inserted replaced
3887:dff6e8f27c4c 3889:9357550095a1
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