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