mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 10:37:52 +08:00
further progress in changing to py__call__
This commit is contained in:
@@ -248,6 +248,9 @@ class InstanceElement(use_metaclass(CachedMetaClass, pr.Base)):
|
||||
return self.var.is_callable()
|
||||
|
||||
def py__call__(self, params, evaluate_generator=False):
|
||||
# TODO this should be working nicer.
|
||||
if isinstance(self.var, compiled.CompiledObject):
|
||||
return self.var.py__call__(self._evaluator, params)
|
||||
stmts = FunctionExecution(self._evaluator, self, params) \
|
||||
.get_return_types(evaluate_generator)
|
||||
return imports.follow_imports(self._evaluator, stmts)
|
||||
|
||||
Reference in New Issue
Block a user