Open
Description
We use to use Appender
and Substitution
decorators to share docstring cross functions. Now we implemented a new decorator doc
for that use case, and it would simplify the reuse of docstrings.
The idea here is to replace Appender
and Substitution
with doc
decorator, and move the shared docstring to a better place if possible.
Example
The original code will be look like this:
@Substitution(**_shared_doc_kwargs)
@Appender(NDFrame.fillna.__doc__)
def fillna(self, value=None, ...) -> Optional["DataFrame"]:
return super().fillna(...)
We would like to change it to this:
@doc(NDFrame.fillna, **_shared_doc_kwargs)
def fillna(self, value=None, ...) -> Optional["DataFrame"]:
return super().fillna(...)