1
0
forked from VimPlug/jedi

submodules are automatically indexed without actually importing them. fixes #413.

However, this is not a 100% correct Python behavior. Python behavior would be to follow ALL imports in all modules (recursively) and check if the module was imported. However, that's a lot of work, that would slow down autocompletion. For now it's better to have no false positives in flaking and to ignore a few attribute errors.
This commit is contained in:
Dave Halter
2014-06-25 01:30:59 +02:00
parent 034a818863
commit 44238a9f92
4 changed files with 31 additions and 5 deletions
+7
View File
@@ -186,6 +186,13 @@ class FakeStatement(pr.Statement):
self.set_expression_list(expression_list)
class FakeImport(pr.Import):
def __init__(self, name, parent):
p = 0, 0
super(FakeImport, self).__init__(FakeSubModule, p, p, name)
self.parent = parent
class FakeName(pr.Name):
def __init__(self, name_or_names, parent=None):
p = 0, 0