From 88499a58d89a21b6d69cde4d20ccdb25f8468858 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:09:38 -0400 Subject: [PATCH] feat(docs): document ASyncDescriptor behavior in dependant libs --- a_sync/a_sync/_descriptor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/a_sync/a_sync/_descriptor.py b/a_sync/a_sync/_descriptor.py index a5f41f85..ccc92419 100644 --- a/a_sync/a_sync/_descriptor.py +++ b/a_sync/a_sync/_descriptor.py @@ -28,6 +28,10 @@ def __init__( self.__wrapped__ = _fget self.field_name = field_name or _fget.__name__ functools.update_wrapper(self, self.__wrapped__) + if self.__doc__ is None: + self.__doc__ = "Since {self.__name__} is a {self.__docstring_append__}" + else: + self.__doc__ += "\n\nSince {self.__name__} is a {self.__docstring_append__}" def __repr__(self) -> str: return f"<{self.__class__.__name__} for {self.__wrapped__}>" def __set_name__(self, owner, name):