Skip to content

Commit 42fa10f

Browse files
committed
Propagate doc to CachedReadOnlyProperty
This allows `help()` and Sphinx to see the docstring defined for `@crop` objects.
1 parent 6dd166f commit 42fa10f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stagpy/misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def __init__(self, thunk):
136136
self._thunk = thunk
137137
self._name = thunk.__name__
138138
self._cache_name = f'_cropped_{self._name}'
139+
self.__doc__ = thunk.__doc__
139140

140141
def __get__(self, instance, _):
141142
try:

0 commit comments

Comments
 (0)