1
0
forked from VimPlug/jedi

fixes for the interpreter stuff, py27 works now fine

This commit is contained in:
Dave Halter
2014-01-22 15:42:11 +01:00
parent 7c105d27e0
commit 4a71f4beeb
4 changed files with 12 additions and 9 deletions

View File

@@ -67,6 +67,8 @@ class LazyName(helpers.FakeName):
# cut the `c` from `.pyc`
with open(path[:-1]) as f:
mod = FastParser(f.read(), path[:-1]).module
if not parser_path:
return mod
found = self._evaluator.eval_call_path(iter(parser_path), mod, None)
if found:
return found[0]
@@ -83,4 +85,6 @@ class LazyName(helpers.FakeName):
def create(evaluator, namespace, parser_module):
ns = InterpreterNamespace(evaluator, namespace, parser_module)
parser_module.statements[0].parent = ns
for attr_name in pr.SCOPE_CONTENTS:
for something in getattr(parser_module, attr_name):
something.parent = ns