forked from VimPlug/jedi
fix Name (instead of Param) as param key
This commit is contained in:
@@ -598,11 +598,12 @@ def follow_call_list(call_list, follow_array=False):
|
||||
# comprehensions
|
||||
result += follow_statement(stmt)
|
||||
else:
|
||||
if isinstance(call, (pr.Lambda)):
|
||||
if isinstance(call, pr.Lambda):
|
||||
result.append(er.Function(call))
|
||||
# With things like params, these can also be functions...
|
||||
elif isinstance(call, (er.Function, er.Class, er.Instance,
|
||||
dynamic.ArrayInstance)):
|
||||
# TODO this is just not very well readable -> fix, use pr.Base
|
||||
result.append(call)
|
||||
# The string tokens are just operations (+, -, etc.)
|
||||
elif not isinstance(call, (str, unicode)):
|
||||
|
||||
@@ -305,7 +305,6 @@ class Function(use_metaclass(cache.CachedMetaClass, pr.Base)):
|
||||
"""
|
||||
Needed because of decorators. Decorators are evaluated here.
|
||||
"""
|
||||
|
||||
def __init__(self, func, is_decorated=False):
|
||||
""" This should not be called directly """
|
||||
self.base_func = func
|
||||
@@ -639,7 +638,9 @@ class Execution(Executable):
|
||||
for key_stmt, value_stmt in array.items():
|
||||
# first index, is the key if syntactically correct
|
||||
call = key_stmt.get_commands()[0]
|
||||
if type(call) == pr.Call:
|
||||
if isinstance(call, pr.Name):
|
||||
yield call, value_stmt
|
||||
elif type(call) == pr.Call:
|
||||
yield call.name, value_stmt
|
||||
else:
|
||||
# `pr`.[Call|Function|Class] lookup.
|
||||
|
||||
@@ -55,9 +55,6 @@ def fast_parent_copy(obj):
|
||||
elif isinstance(el, list):
|
||||
copied_list[i] = list_rec(el)
|
||||
return copied_list
|
||||
|
||||
if isinstance(obj, list):
|
||||
obj = tuple(obj)
|
||||
return recursion(obj)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user