forked from VimPlug/jedi
A module shouldn't be callable.
This commit is contained in:
@@ -32,12 +32,18 @@ class CompiledObject(Base):
|
|||||||
self.obj = obj
|
self.obj = obj
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
|
||||||
def py__call__(self, evaluator, params):
|
@property
|
||||||
if inspect.isclass(self.obj):
|
def py__call__(self):
|
||||||
from jedi.evaluate.representation import Instance
|
def actual(evaluator, params):
|
||||||
return [Instance(evaluator, self, params)]
|
if inspect.isclass(self.obj):
|
||||||
else:
|
from jedi.evaluate.representation import Instance
|
||||||
return list(self._execute_function(evaluator, params))
|
return [Instance(evaluator, self, params)]
|
||||||
|
else:
|
||||||
|
return list(self._execute_function(evaluator, params))
|
||||||
|
|
||||||
|
# Might raise an AttributeError, which is intentional.
|
||||||
|
self.obj.__call__
|
||||||
|
return actual
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def doc(self):
|
def doc(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user