mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-14 17:47:05 +08:00
the type of a compiled object is also function, not def
This commit is contained in:
@@ -61,7 +61,7 @@ class CompiledObject(Base):
|
|||||||
return 'module'
|
return 'module'
|
||||||
elif inspect.isbuiltin(cls) or inspect.ismethod(cls) \
|
elif inspect.isbuiltin(cls) or inspect.ismethod(cls) \
|
||||||
or inspect.ismethoddescriptor(cls):
|
or inspect.ismethoddescriptor(cls):
|
||||||
return 'def'
|
return 'function'
|
||||||
|
|
||||||
def is_executable_class(self):
|
def is_executable_class(self):
|
||||||
return inspect.isclass(self.obj)
|
return inspect.isclass(self.obj)
|
||||||
@@ -99,7 +99,7 @@ class CompiledObject(Base):
|
|||||||
return self._cls().obj.__name__
|
return self._cls().obj.__name__
|
||||||
|
|
||||||
def execute_function(self, evaluator, params):
|
def execute_function(self, evaluator, params):
|
||||||
if self.type() != 'def':
|
if self.type() != 'function':
|
||||||
return
|
return
|
||||||
|
|
||||||
for name in self._parse_function_doc()[1].split():
|
for name in self._parse_function_doc()[1].split():
|
||||||
|
|||||||
Reference in New Issue
Block a user