Skip to content

Commit 83dcba0

Browse files
BUG: Fix detection of cached_property attrs.
Co-authored-by: Tirth Patel <[email protected]>
1 parent 9c8fbd3 commit 83dcba0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpydoc/docscrape.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from warnings import warn
99
from collections import namedtuple
1010
from collections.abc import Callable, Mapping
11+
from functools import cached_property
1112
import copy
1213
import sys
1314

@@ -706,7 +707,7 @@ def properties(self):
706707
not name.startswith("_")
707708
and (
708709
func is None
709-
or isinstance(func, property)
710+
or isinstance(func, (property, cached_property))
710711
or inspect.isdatadescriptor(func)
711712
)
712713
and self._is_show_member(name)

0 commit comments

Comments
 (0)