I am trying to run autodoc on a class that extends the outer class.
I used mock to import was accepted.
For this, I used what was described on this blog http://blog.rtwilson.com/how-to-make-your-sphinx-documentation-compile-with-readthedocs-when-youre-using-numpy-and- scipy /
import mock
MOCK_MODULES = ['de', 'de.xyz', 'de.xyz.class_that_is_extended']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()
The python file I'm trying to do is as follows: from de.xyz import class_that_is_extended
class extending_class (class_that_is_extended):
'''
docstring
'''
After running sphinx, the result is that only the class name and source link are shown.
When I change the line "class extend_class (class_that_is_extended):" to "class extend_class (object):" sphinx / autodoc creates the documentation with docstring.
docstring ?