Files
openide/python/testData/refactoring/extractmethod/LocalVarDefinedBeforeModifiedInside.after.py
Mikhail Golubev 45cc683033 PY-10829 Extracted function is inserted *after* the function where it is used
I updated test data accordingly and removed now obsolete tests about
skipping preceding comments.
2015-04-02 20:08:32 +03:00

15 lines
298 B
Python

def main(indices):
foo = True
for i in indices:
foo, need_break = bar(foo, i)
if need_break:
break
return foo
def bar(foo_new, i_new):
need_break = False
if i_new > 2:
foo_new = False
need_break = True
return foo_new, need_break