diff --git a/numpydoc/docscrape.py b/numpydoc/docscrape.py index 5e7ffa5d..a55fdffd 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -16,7 +16,6 @@ import copy import sys -from sphinx.ext.autodoc import ALL def strip_blank_lines(l): "Remove leading and trailing blank lines from a list of lines" @@ -626,6 +625,11 @@ def __init__(self, cls, doc=None, modulename='', func_doc=FunctionDoc, raise ValueError("Expected a class or None, but got %r" % cls) self._cls = cls + if 'sphinx' in sys.modules: + from sphinx.ext.autodoc import ALL + else: + ALL = object() + self.show_inherited_members = config.get( 'show_inherited_class_members', True)