1
0
forked from VimPlug/jedi

The sys.modules implementation did not work properly with newly created files.

Fixes #886.
This commit is contained in:
Dave Halter
2017-09-19 18:16:22 +02:00
parent 03584ff3f3
commit 0c01a3b823
4 changed files with 41 additions and 4 deletions

View File

@@ -209,6 +209,7 @@ def _create(evaluator, obj, parent_context=None, *args):
else:
from jedi.evaluate.representation import ModuleContext
module_context = ModuleContext(evaluator, module_node, path=path)
# TODO this __name__ is probably wrong.
name = compiled_object.get_root_context().py__name__()
imports.add_module(evaluator, name, module_context)