forked from VimPlug/jedi
dicts should not be used to check against in get_defined_names, because they cannot contain a defined name (lists and tuples can) so just ignore them., fixes #417
This commit is contained in:
@@ -934,7 +934,7 @@ isinstance(c, (tokenize.Token, Operator)) else unicode(c)
|
|||||||
|
|
||||||
def search_calls(calls):
|
def search_calls(calls):
|
||||||
for call in calls:
|
for call in calls:
|
||||||
if isinstance(call, Array):
|
if isinstance(call, Array) and call.type != Array.DICT:
|
||||||
for stmt in call:
|
for stmt in call:
|
||||||
search_calls(stmt.expression_list())
|
search_calls(stmt.expression_list())
|
||||||
elif isinstance(call, Call):
|
elif isinstance(call, Call):
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ def test_no_signature():
|
|||||||
assert len(Script(s, column=2).call_signatures()) == 1
|
assert len(Script(s, column=2).call_signatures()) == 1
|
||||||
|
|
||||||
|
|
||||||
def test_dicts():
|
def test_dict_literal_in_incomplete_call():
|
||||||
source = """\
|
source = """\
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user