1
0
forked from VimPlug/jedi

subscriptable errors.

This commit is contained in:
Dave Halter
2014-10-25 11:34:16 +02:00
parent 995f0700c9
commit 22cb3ca5f0
2 changed files with 9 additions and 2 deletions

View File

@@ -234,7 +234,13 @@ class Evaluator(object):
elif trailer_op == '(':
new_types += self.execute(typ, node)
elif trailer_op == '[':
new_types += typ.get_index_types(node)
try:
get = typ.get_index_types
except AttributeError:
debug.warning("TypeError: '%s' object is not subscriptable"
% typ)
else:
new_types += get(self, node)
return new_types
@debug.increase_indent

View File

@@ -161,7 +161,8 @@ def get_params(evaluator, func, var_args):
param_dict[str(param.get_name())] = param
# There may be calls, which don't fit all the params, this just ignores it.
#unpacked_va = _unpack_var_args(evaluator, var_args, func)
var_arg_iterator = common.PushBackIterator(iter(var_args.unpack()))
unpacked_va = var_args.unpack()
var_arg_iterator = common.PushBackIterator(iter(unpacked_va))
non_matching_keys = []
keys_used = set()