We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5195b2f commit a762d8aCopy full SHA for a762d8a
docs/sphinx/conf.py
@@ -28,6 +28,7 @@
28
29
import os
30
import sys
31
+from unittest.mock import MagicMock
32
33
import sphinx_rtd_theme
34
@@ -43,6 +44,17 @@
43
44
lib_path = os.getenv("SPHINX_PYTHON_SRC", default=".")
45
sys.path.insert(0, os.path.abspath(lib_path))
46
47
+# -- Module mocking ----------------------------------------------------------
48
+
49
+class Mock(MagicMock):
50
+ @classmethod
51
+ def __getattr__(cls, name):
52
+ return MagicMock()
53
54
+# List of modules to mock
55
+MOCK_MODULES = ['cvcuda']
56
+sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
57
58
# -- General configuration ---------------------------------------------------
59
60
# Add any Sphinx extension module names here, as strings. They can be
0 commit comments