Skip to content

Commit

Permalink
DOC: Mock names starting with '_' as modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Dec 21, 2019
1 parent e3243d0 commit 265be09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
'cvxpy',
'numexpr',
'numpy',
'osqp',
'pandas',
'pandas.api.types',
'scipy',
Expand Down Expand Up @@ -314,6 +315,7 @@
'sklearn.tree',
'sklearn.tree._splitter',
'sklearn.tree._tree',
'sklearn.tree.tree',
'sklearn.utils',
'sklearn.utils._joblib',
'sklearn.utils.extmath',
Expand Down Expand Up @@ -343,7 +345,7 @@ class MockModule(Mock):
def __getattr__(cls, name):
if name in ('__file__', '__path__'):
return '/dev/null'
elif name[0] == name[0].upper():
elif name[0] == name[0].upper() and name[0] != "_":
# Not very good, we assume Uppercase names are classes...
mocktype = type(name, (), {})
mocktype.__module__ = __name__
Expand Down

0 comments on commit 265be09

Please sign in to comment.