forked from VimPlug/jedi
fixed dict problems
This commit is contained in:
@@ -121,7 +121,7 @@ class Script(object):
|
|||||||
for c in names:
|
for c in names:
|
||||||
completions.append((c, s))
|
completions.append((c, s))
|
||||||
|
|
||||||
if not dot: # named_params have no dots
|
if not dot: # named params have no dots
|
||||||
call_def = self.get_in_function_call()
|
call_def = self.get_in_function_call()
|
||||||
if call_def:
|
if call_def:
|
||||||
if not call_def.module.is_builtin():
|
if not call_def.module.is_builtin():
|
||||||
|
|||||||
@@ -838,13 +838,14 @@ class Array(use_metaclass(cache.CachedMetaClass, pr.Base)):
|
|||||||
for i, key_statement in enumerate(self._array.keys):
|
for i, key_statement in enumerate(self._array.keys):
|
||||||
# Because we only want the key to be a string.
|
# Because we only want the key to be a string.
|
||||||
key_commands = key_statement.get_commands()
|
key_commands = key_statement.get_commands()
|
||||||
if len(key_commands) == 1:
|
if len(key_commands) != 1: # cannot deal with complex strings
|
||||||
|
continue
|
||||||
key = key_commands[0]
|
key = key_commands[0]
|
||||||
key.get_code()
|
if isinstance(key, pr.Call) and key.type == pr.Call.STRING:
|
||||||
try:
|
str_key = key.name
|
||||||
str_key = key.get_code()
|
elif isinstance(key, pr.Name):
|
||||||
except AttributeError:
|
str_key = str(key)
|
||||||
str_key = None
|
|
||||||
if mixed_index == str_key:
|
if mixed_index == str_key:
|
||||||
index = i
|
index = i
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user