Skip to content

Commit 44dc043

Browse files
committed
Fixing RTD generation
1 parent b62a91d commit 44dc043

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515

1616
import sys
1717
import os
18+
from unittest.mock import MagicMock
19+
20+
class Mock(MagicMock):
21+
@classmethod
22+
def __getattr__(cls, name):
23+
return MagicMock()
24+
25+
MOCK_MODULES = ['face_recognition_models', 'Click', 'dlib', 'numpy', 'scipy', 'scipy.misc']
26+
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
1827

1928
# If extensions (or modules to document with autodoc) are in another
2029
# directory, add these directories to sys.path here. If the directory is

0 commit comments

Comments
 (0)