Skip to content

Commit 5773b71

Browse files
Use isdatadescriptor instead of isgetsetdescriptor
1 parent fb6afac commit 5773b71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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):

numpydoc/docscrape_sphinx.py

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

248248
if param_obj and pydoc.getdoc(param_obj):

0 commit comments

Comments
 (0)