forked from VimPlug/jedi
Basic implementation support for namedexpr, fixes #1647
This commit is contained in:
@@ -170,6 +170,8 @@ class InferenceState:
|
||||
return tree_name_to_values(self, context, name)
|
||||
elif type_ == 'param':
|
||||
return context.py__getattribute__(name.value, position=name.end_pos)
|
||||
elif type_ == 'namedexpr_test':
|
||||
return context.infer_node(def_)
|
||||
else:
|
||||
result = follow_error_node_imports_if_possible(context, name)
|
||||
if result is not None:
|
||||
|
||||
@@ -753,6 +753,8 @@ def tree_name_to_values(inference_state, context, tree_name):
|
||||
types = NO_VALUES
|
||||
elif typ == 'del_stmt':
|
||||
types = NO_VALUES
|
||||
elif typ == 'namedexpr_test':
|
||||
types = infer_node(context, node)
|
||||
else:
|
||||
raise ValueError("Should not happen. type: %s" % typ)
|
||||
return types
|
||||
|
||||
Reference in New Issue
Block a user