1
0
forked from VimPlug/jedi

working inline refactoring

This commit is contained in:
David Halter
2013-01-07 20:19:42 +01:00
parent 07cb30d91b
commit 8fbe1c47a5
2 changed files with 59 additions and 10 deletions

View File

@@ -782,7 +782,8 @@ class Statement(Simple):
self._assignment_details.append((tok, top))
# All these calls wouldn't be important if nonlocal would
# exist. -> Initialize the first items again.
top = result = Array(start_pos, Array.NOARRAY, self)
end_pos = start_pos[0], start_pos[1] + len(tok)
top = result = Array(end_pos, Array.NOARRAY, self)
level = 0
close_brackets = False
is_chain = False
@@ -876,7 +877,10 @@ class Statement(Simple):
"This is not normal behaviour." % level)
while result is not None:
result.end_pos = start_pos[0], start_pos[1] + len(tok)
try:
result.end_pos = start_pos[0], start_pos[1] + len(tok)
except TypeError:
result.end_pos = tok.end_pos
result = result.parent
self._assignment_calls_calculated = True