1
0
forked from VimPlug/jedi

Start fixing issues with for loops and += operations.

This commit is contained in:
Dave Halter
2014-11-12 14:54:52 +01:00
parent 13c2279fea
commit 408eee50dd
4 changed files with 27 additions and 16 deletions
+5 -1
View File
@@ -82,10 +82,14 @@ class NameFinder(object):
# Only the names defined in the last position are valid definitions.
last_names = []
for name in reversed(sorted(names, key=lambda name: name.start_pos)):
if isinstance(self.name_str, pr.Name):
origin_scope = self.name_str.get_definition().parent
else:
origin_scope = None
check = flow_analysis.break_check(self._evaluator,
scope,
name.get_definition(),
self.name_str.get_definition().parent)
origin_scope)
if check is not flow_analysis.UNREACHABLE:
last_names.append(name)
if check is flow_analysis.REACHABLE: