1
0
forked from VimPlug/jedi

fix Param calling in API

This commit is contained in:
Dave Halter
2014-03-13 11:27:53 +01:00
parent a835fcd0ce
commit f132dd852d
2 changed files with 6 additions and 4 deletions

View File

@@ -548,7 +548,8 @@ class CallDef(object):
It knows what functions you are currently in. e.g. `isinstance(` would
return the `isinstance` function. without `(` it would return nothing.
"""
def __init__(self, executable, index, call):
def __init__(self, evaluator, executable, index, call):
self._evaluator = evaluator
self._executable = executable
self.index = index
self._call = call
@@ -558,7 +559,8 @@ class CallDef(object):
if self._executable.isinstance(er.Function):
if isinstance(self._executable, er.InstanceElement):
params = self._executable.params[1:]
return self._executable.params
else:
params = self._executable.params
elif self._executable.isinstance(er.compiled.CompiledObject):
params = self._executable.params
else:
@@ -567,7 +569,7 @@ class CallDef(object):
params = sub.params[1:] # ignore self
except KeyError:
return []
return [Param(p) for p in params]
return [Param(self._evaluator, p) for p in params]
@property
def bracket_start(self):