compose_docstring

function of dascore.utils.docs source

compose_docstring(
    **kwargs: str | collections.abc.Sequence[str, collections.abc.Sequence[str]] ,
)

Decorator for composing docstrings.

This allows components of docstrings which are often repeated to be specified in a single place. Values provided to this function should have string keys and string or list values. Keys are found in curly brackets in the wrapped functions docstring and their values are substituted with proper indentation.

Note

A function’s docstring can be accessed via the __docs__ attribute.

Examples

from dascore.utils.docs import compose_docstring

@compose_docstring(some_value='10')
def example_function():
    '''
    Some useful description

    The following line will be the string '10':
    {some_value}
    '''

```