Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Commit

Permalink
Attempt to fix mock imports for rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
lukassnoek committed Aug 2, 2016
1 parent 1f96c06 commit 0552a1e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@
import sys
import os
import mock
import sys
from mock import Mock as MagicMock

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

MOCK_MODULES = ['numpy', 'scipy', 'joblib', 'nilearn', 'nipype', 'h5py',
'sklearn', 'pandas', 'seaborn', 'matplotlib', 'nibabel']
'sklearn', 'sklearn.base', 'pandas', 'seaborn', 'matplotlib', 'nibabel']

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

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

0 comments on commit 0552a1e

Please sign in to comment.