forked from VimPlug/jedi
dynamic array additions are working with list.append
This commit is contained in:
11
evaluate.py
11
evaluate.py
@@ -1171,9 +1171,14 @@ def follow_call_list(call_list):
|
||||
def follow_call(call):
|
||||
""" Follow a call is following a function, variable, string, etc. """
|
||||
scope = call.parent_stmt.parent
|
||||
path = call.generate_call_list()
|
||||
path = call.generate_call_path()
|
||||
|
||||
position = call.parent_stmt.start_pos
|
||||
return follow_call_path(path, scope, position)
|
||||
|
||||
|
||||
def follow_call_path(path, scope, position):
|
||||
""" Follows a path generated by `parsing.Call.generate_call_path()` """
|
||||
current = next(path)
|
||||
|
||||
if isinstance(current, parsing.Array):
|
||||
@@ -1239,7 +1244,9 @@ def follow_path(path, scope, position=None):
|
||||
if isinstance(current, parsing.Array):
|
||||
# This must be an execution, either () or [].
|
||||
if current.type == parsing.Array.LIST:
|
||||
result = scope.get_index_types(current)
|
||||
result = list(scope.get_index_types(current))
|
||||
if isinstance(scope, Array):
|
||||
result += dynamic.check_array_additions(scope)
|
||||
elif current.type not in [parsing.Array.DICT]:
|
||||
# Scope must be a class or func - make an instance or execution.
|
||||
debug.dbg('exe', scope)
|
||||
|
||||
Reference in New Issue
Block a user