1
0
forked from VimPlug/jedi

create_value can deal with modules now

This commit is contained in:
Dave Halter
2019-08-23 00:45:59 +02:00
parent 05ce1c8237
commit 041fd992b3
2 changed files with 6 additions and 5 deletions

View File

@@ -289,10 +289,7 @@ def _create(inference_state, access_handle, parent_context, *args):
return ValueSet({compiled_object})
module_context = parent_context.get_root_context()
if tree_node is module_node:
tree_values = ValueSet({module_context.get_value()})
else:
tree_values = ValueSet({module_context.create_value(tree_node)})
tree_values = ValueSet({module_context.create_value(tree_node)})
if tree_node.type == 'classdef':
if not access_handle.is_class():
# Is an instance, not a class.