1
0
forked from VimPlug/jedi

remove a lot of modules crap and replace it with a simple method called load_module

This commit is contained in:
Dave Halter
2014-01-04 14:34:56 +01:00
parent 962a678417
commit 29e661ea74
3 changed files with 34 additions and 73 deletions

View File

@@ -24,7 +24,6 @@ from jedi import common
from jedi import debug
from jedi.parser import representation as pr
from jedi import cache
from jedi.evaluate import builtin
class ModuleNotFound(Exception):
@@ -359,14 +358,9 @@ class ImportPath(pr.Base):
else:
source = current_namespace[0].read()
current_namespace[0].close()
if path.endswith('.py'):
f = modules.Module(path, source)
else:
f = builtin.BuiltinModule(path=path)
return modules.load_module(path, source), rest
else:
f = builtin.BuiltinModule(name=path)
return f.parser.module, rest
return modules.load_module(name=path), rest
def strip_imports(evaluator, scopes):