Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Autodoc unable to mock submodules #2174
I am running into the same type of issue. I am trying to mock the import of a third party submodule of a submodule of a module (mod.Submod.subsubmod). When Submod has a capitalized first letter, I get:
I don't get the error if Submod is submod. I think Sphinx is interpreting Submod as a class, not a submodule. Unfortunately, I cannot just lowercase the submodule name.
Before giving an example, I would like to enforce what @danbrees said:
by referencing _MockModule class in /ext/autodoc.py on my machine. (I have installed sphinx via debian so i have version '1.3.6-2ubuntu1.1')