forked from VimPlug/jedi
Fix a stub docs issue
This commit is contained in:
@@ -341,6 +341,12 @@ class TreeNameDefinition(AbstractTreeName):
|
||||
def py__doc__(self):
|
||||
api_type = self.api_type
|
||||
if api_type in ('function', 'class', 'property'):
|
||||
if self.parent_context.get_root_context().is_stub():
|
||||
from jedi.inference.gradual.conversion import convert_names
|
||||
names = convert_names([self], prefer_stub_to_compiled=False)
|
||||
if self not in names:
|
||||
return _merge_name_docs(names)
|
||||
|
||||
# Make sure the names are not TreeNameDefinitions anymore.
|
||||
return clean_scope_docstring(self.tree_name.get_definition())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user