1
0
forked from VimPlug/jedi

restructured api_classes, use the same base class

This commit is contained in:
David Halter
2012-11-07 23:29:17 +01:00
parent 5550bb4c9a
commit 20ef1ffd18
4 changed files with 65 additions and 71 deletions
+3 -2
View File
@@ -78,7 +78,7 @@ class ImportPath(object):
# This is not an existing Import statement. Therefore, set position to
# None.
zero = (None, None)
n = parsing.Name(i.namespace.names[1:], zero, zero)
n = parsing.Name(i.namespace.names[1:], zero, zero, self.import_stmt)
new = parsing.Import(zero, zero, n)
new.parent = weakref.ref(parent)
evaluate.faked_scopes.append(new)
@@ -125,7 +125,8 @@ class ImportPath(object):
names = []
for module_loader, name, is_pkg in pkgutil.iter_modules(search_path):
inf_pos = (float('inf'), float('inf'))
names.append(parsing.Name([(name, inf_pos)], inf_pos, inf_pos))
names.append(parsing.Name([(name, inf_pos)], inf_pos, inf_pos,
self.import_stmt))
return names
def sys_path_with_modifications(self):