forked from VimPlug/jedi
docstring was sometimes empty for faked modules
This commit is contained in:
@@ -51,7 +51,6 @@ def search_scope(scope, obj_name):
|
|||||||
|
|
||||||
def _faked(module, obj, name):
|
def _faked(module, obj, name):
|
||||||
# Crazy underscore actions to try to escape all the internal madness.
|
# Crazy underscore actions to try to escape all the internal madness.
|
||||||
obj = obj.__class__ if is_class_instance(obj) else obj
|
|
||||||
if module is None:
|
if module is None:
|
||||||
try:
|
try:
|
||||||
module = obj.__objclass__
|
module = obj.__objclass__
|
||||||
@@ -92,11 +91,12 @@ def _faked(module, obj, name):
|
|||||||
|
|
||||||
|
|
||||||
def get_faked(module, obj, name=None):
|
def get_faked(module, obj, name=None):
|
||||||
|
obj = obj.__class__ if is_class_instance(obj) else obj
|
||||||
result = _faked(module, obj, name)
|
result = _faked(module, obj, name)
|
||||||
if not isinstance(result, Class) and result is not None:
|
if not isinstance(result, Class) and result is not None:
|
||||||
# Set the docstr which was previously not set (faked modules don't
|
# Set the docstr which was previously not set (faked modules don't
|
||||||
# contain it).
|
# contain it).
|
||||||
result.docstr = obj.__doc__
|
result.docstr = obj.__doc__ or ''
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user