1
0
forked from VimPlug/jedi

fixed docstr problems with unified interfaces

This commit is contained in:
Dave Halter
2014-02-26 02:33:18 +01:00
parent 5e5bb618ea
commit 44e16c11e5
5 changed files with 43 additions and 56 deletions

View File

@@ -231,7 +231,7 @@ class BaseDefinition(object):
"""
try:
return self._definition.doc or '' # Always a String, never None.
return self._definition.doc
except AttributeError:
return self.raw_doc
@@ -242,12 +242,8 @@ class BaseDefinition(object):
See :attr:`doc` for example.
"""
print self._definition.docstr
if isinstance(self._definition.docstr, Token):
# TODO again ugly, we should have direct access.
return unicode(self._definition.docstr.string)
try:
return unicode(self._definition.docstr)
return self._definition.raw_doc
except AttributeError:
return ''