Skip to content

Commit a762d8a

Browse files
Update conf.py (#201)
Signed-off-by: Miles Price <[email protected]>
1 parent 5195b2f commit a762d8a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/sphinx/conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import os
3030
import sys
31+
from unittest.mock import MagicMock
3132

3233
import sphinx_rtd_theme
3334

@@ -43,6 +44,17 @@
4344
lib_path = os.getenv("SPHINX_PYTHON_SRC", default=".")
4445
sys.path.insert(0, os.path.abspath(lib_path))
4546

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+
4658
# -- General configuration ---------------------------------------------------
4759

4860
# Add any Sphinx extension module names here, as strings. They can be

0 commit comments

Comments
 (0)