The sys.modules implementation did not work properly with newly created files.
Fixes #886.
This commit is contained in:
1 parent
03584ff3f3
commit
0c01a3b823
4 files changed
+41
-4
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user