fix lambda issues

This commit is contained in:
Dave Halter
2014-08-06 12:40:08 +02:00
parent e3bb0ccc2e
commit 23c39eff9a
4 changed files with 14 additions and 13 deletions
-6
View File
@@ -9,12 +9,6 @@ class Status(object):
self._name = name
Status.lookup_table[value] = self
def __eq__(self, other):
return self._value == other.value
def __ne__(self, other):
return not self.__eq__(other)
def __and__(self, other):
if UNSURE in (self, other):
return other
+7 -3
View File
@@ -476,13 +476,17 @@ class FunctionExecution(Executed):
types = list(docstrings.find_return_types(self._evaluator, func))
for r in self.returns:
# r is a KeywordStatement
if r.stmt is None:
if isinstance(r, pr.KeywordStatement):
stmt = r.stmt
else:
stmt = r # Lambdas
if stmt is None:
continue
check = flow_analysis.break_check(self._evaluator, self, r.parent)
if check is not flow_analysis.UNREACHABLE:
types += self._evaluator.eval_statement(r.stmt)
types += self._evaluator.eval_statement(stmt)
if check is flow_analysis.REACHABLE:
break
return types