From fef0ef26f1c60f16a1b77fc6c420f785af0eb721 Mon Sep 17 00:00:00 2001 From: tqchen Date: Sun, 26 Jul 2015 12:29:18 -0700 Subject: [PATCH] new doc --- doc/conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 5d66ef236..52d32f2b9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -15,6 +15,16 @@ import sys import os, subprocess import shlex +from mock import Mock as MagicMock + +# mock out some of the modules to make docomentation easier +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return Mock() + +MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # 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