1
0
forked from VimPlug/jedi

sorting the statements for analysis. we need to be able to reproduce results.

This commit is contained in:
Dave Halter
2014-05-13 15:56:41 +02:00
parent 876942d2b8
commit 7632a7d120

View File

@@ -588,7 +588,8 @@ class Script(object):
def _analysis(self):
statements = set(chain(*self._parser.module().used_names.values()))
for stmt in statements:
# Sort the statements so that the results are reproducible.
for stmt in sorted(statements, key=lambda obj: obj.start_pos):
if isinstance(stmt, pr.Import):
imps = imports.ImportWrapper(self._evaluator, stmt,
nested_resolve=True).follow()