mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-15 01:57:06 +08:00
list.extend / set.update works now
This commit is contained in:
@@ -144,8 +144,8 @@ def _check_array_additions(compare_array, module, is_list):
|
|||||||
else:
|
else:
|
||||||
result += evaluate.follow_call_list([second_param])
|
result += evaluate.follow_call_list([second_param])
|
||||||
elif add_name in ['extend', 'update']:
|
elif add_name in ['extend', 'update']:
|
||||||
# TODO needs extensive work, because this are iterables
|
iterators = evaluate.follow_call_list(params)
|
||||||
result += evaluate.follow_call_list(params)
|
result += evaluate.handle_iterators(iterators)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
search_names = ['append', 'extend', 'insert'] if is_list else \
|
search_names = ['append', 'extend', 'insert'] if is_list else \
|
||||||
|
|||||||
@@ -162,9 +162,14 @@ arr.extend([1,2,3])
|
|||||||
arr.extend([])
|
arr.extend([])
|
||||||
arr.extend("") # should ignore
|
arr.extend("") # should ignore
|
||||||
|
|
||||||
##? float() int()
|
#? float() int()
|
||||||
arr[0]
|
arr[100]
|
||||||
|
|
||||||
|
a = set(arr)
|
||||||
|
a.update(list(["", 1]))
|
||||||
|
|
||||||
|
#? float() int() str()
|
||||||
|
list(a)[0]
|
||||||
# -----------------
|
# -----------------
|
||||||
# set/list initialized as functions
|
# set/list initialized as functions
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user