Skip to content

Commit

Permalink
DOC: change to numpydoc: use isdatadescriptor instead of isgetsetdesc…
Browse files Browse the repository at this point in the history
…riptor to check attributes

This is needed to ensure .columns / .index / cached properties are recognized as an attribute
  • Loading branch information
jorisvandenbossche committed Mar 27, 2018
1 parent e31f345 commit 962528f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/sphinxext/numpydoc/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def properties(self):
return [name for name, func in inspect.getmembers(self._cls)
if (not name.startswith('_') and
(func is None or isinstance(func, property) or
inspect.isgetsetdescriptor(func))
inspect.isdatadescriptor(func))
and self._is_show_member(name))]

def _is_show_member(self, name):
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinxext/numpydoc/docscrape_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def _str_member_list(self, name):
param_obj = getattr(self._obj, param, None)
if not (callable(param_obj)
or isinstance(param_obj, property)
or inspect.isgetsetdescriptor(param_obj)):
or inspect.isdatadescriptor(param_obj)):
param_obj = None

if param_obj and pydoc.getdoc(param_obj):
Expand Down

0 comments on commit 962528f

Please sign in to comment.