Permalink
Browse files

BUG: numpydoc: check that it works with sub-classes

  • Loading branch information...
1 parent 1b2e585 commit a3bc1467dee14dd4726a83af2fb1a4cb89cbf53b @pv pv committed Feb 16, 2013
Showing with 5 additions and 1 deletion.
  1. +1 −1 doc/sphinxext/numpydoc/docscrape.py
  2. +4 −0 doc/sphinxext/numpydoc/tests/test_docscrape.py
@@ -511,7 +511,7 @@ def methods(self):
return [name for name,func in inspect.getmembers(self._cls)
if ((not name.startswith('_')
or name in self.extra_public_methods)
- and callable(func))]
+ and callable(func) and not isinstance(func, type))]
@property
def properties(self):
@@ -603,6 +603,10 @@ def spammity(self):
"""Spammity index"""
return 0.95
+ class Ignorable(object):
+ """local class, to be ignored"""
+ pass
+
for cls in (ClassDoc, SphinxClassDoc):
doc = cls(Dummy, config=dict(show_class_members=False))
assert 'Methods' not in str(doc), (cls, str(doc))

0 comments on commit a3bc146

Please sign in to comment.