I'm trying to document a module with Sphinx and auto-document extension. I have some libraries that cannot be imported with standard python (they came from a very complicated in-house framework for Maya). I have mock-ed out this modules, and everything work as expected except for any class that inherits from a Mock-ed class. This classes didn't appear in the resulting documentation.
This is the way I have mock-ed my modules (this code lies inside conf.py
):
for mod in MODULE_LIST:
sys.modules[mod] = mock.MagicMock()
I have already read this question Sphinx-doc :automodule: with Mock imports, but I can't implement the accepted solution because we have a huge number of modules.
Is there any way to make Sphinx ignore inheritance of the mock-ed modules?