gh-107995: Fix doctest collection of functools.cached_property objects (#107996)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Tyler Smart 2023-08-18 08:44:38 -07:00 committed by GitHub
parent 28cab71f95
commit 9bb576cb07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 0 deletions

View file

@ -984,6 +984,7 @@ class cached_property:
self.func = func
self.attrname = None
self.__doc__ = func.__doc__
self.__module__ = func.__module__
def __set_name__(self, owner, name):
if self.attrname is None: