Skip to content

Commit 77cf8a2

Browse files
DOC: change to numpydoc: use isdatadescriptor instead of isgetsetdescriptor to check attributes
This is needed to ensure .columns / .index / cached properties are recognized as an attribute
1 parent 914c59f commit 77cf8a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/sphinxext/numpydoc/docscrape.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ def properties(self):
613613
return [name for name, func in inspect.getmembers(self._cls)
614614
if (not name.startswith('_') and
615615
(func is None or isinstance(func, property) or
616-
inspect.isgetsetdescriptor(func))
616+
inspect.isdatadescriptor(func))
617617
and self._is_show_member(name))]
618618

619619
def _is_show_member(self, name):

doc/sphinxext/numpydoc/docscrape_sphinx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def _str_member_list(self, name):
243243
param_obj = getattr(self._obj, param, None)
244244
if not (callable(param_obj)
245245
or isinstance(param_obj, property)
246-
or inspect.isgetsetdescriptor(param_obj)):
246+
or inspect.isdatadescriptor(param_obj)):
247247
param_obj = None
248248

249249
if param_obj and pydoc.getdoc(param_obj):

0 commit comments

Comments
 (0)