1
0
forked from VimPlug/jedi

Goto on named params in class calls is now working.

This commit is contained in:
Dave Halter
2014-09-18 20:11:58 +02:00
parent ba80e35204
commit 69e6139527
3 changed files with 13 additions and 2 deletions
+7 -1
View File
@@ -337,7 +337,13 @@ class Evaluator(object):
param_names = []
named_param_name = stmt.get_defined_names()[0]
for typ in self.eval_call(call):
for param in typ.params:
if isinstance(typ, er.Class):
params = []
for init_method in typ.py__getattribute__('__init__'):
params += init_method.params
else:
params = typ.params
for param in params:
if unicode(param.get_name()) == unicode(named_param_name):
param_names.append(param.get_name().names[-1])
return param_names