Skip to content

Commit

Permalink
Update conf.py (#201)
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Price <[email protected]>
  • Loading branch information
milesp-nvidia authored Sep 18, 2024
1 parent 5195b2f commit a762d8a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import os
import sys
from unittest.mock import MagicMock

import sphinx_rtd_theme

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

# -- Module mocking ----------------------------------------------------------

class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()

# List of modules to mock
MOCK_MODULES = ['cvcuda']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# -- General configuration ---------------------------------------------------

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

0 comments on commit a762d8a

Please sign in to comment.