1
0
forked from VimPlug/jedi

again a temporary follow_definition for imports

This commit is contained in:
Dave Halter
2014-03-21 09:27:52 +01:00
parent 1703f7cca6
commit a06310db4a
2 changed files with 31 additions and 53 deletions

View File

@@ -400,8 +400,14 @@ class Completion(BaseDefinition):
if self._definition.isinstance(pr.Statement):
defs = self._evaluator.eval_statement(self._definition)
elif self._definition.isinstance(pr.Import):
print(self._definition)
defs = imports.strip_imports(self._evaluator, [self._definition])
print('ha', self._definition, repr(self._name))
i = imports.ImportPath(self._evaluator, self._definition, True)
print('h', i.import_path + [unicode(self._name)])
defs = imports.Importer(i.import_path + [unicode(self._name)],
i._importer.module).follow_file_system()[0]
defs = [defs]
print(defs)
#defs = imports.strip_imports(self._evaluator, [self._definition])
else:
return [self]