1
0
forked from VimPlug/jedi

Test fixes and for loops need to be handled a awell in flow_analysis.

This commit is contained in:
Dave Halter
2014-08-07 15:51:41 +02:00
parent 0ae9e520c1
commit 01bdd1e4fa
3 changed files with 5 additions and 3 deletions

View File

@@ -65,3 +65,5 @@ def _check_flow(evaluator, flow):
return UNSURE
elif flow.command in ('try', 'except', 'finally', 'while'):
return UNSURE
else: # for loop
return REACHABLE

View File

@@ -269,7 +269,7 @@ class MethodDecoratorDoesntExist(Base):
# -----------------
def memoize(function):
def wrapper(*args):
if 1:
if random.choice([0, 1]):
pass
else:
rv = function(*args)

View File

@@ -318,8 +318,8 @@ blub()[0]
# with else clause
def blub():
if 1:
1
if random.choice([0, 1]):
1
else:
a = []
a.append(1)