Docstring Parsing Tools (utilipy.utils.doc_parse_tools)

Reference/API

utilipy.utils.doc_parse_tools Package

Docstring Parsing Tools.

Docstring inheritance-style implementations.

To implement your own inheritance file, simply write a function that fits the template

def your_style(prnt_doc, child_doc):
    ''' Merges parent and child docstrings

        Parameters
        ----------
        prnt_cls_doc: Optional[str]
        child_doc: Optional[str]

        Returns
        ------
        Optional[str]
            The merged docstring that will be utilized.'''
    return final_docstring

and log this using custom_inherit.add_style(your_style). To permanently save your function

  1. define your function within custom_inherit/_style_store.py

  2. log it in custom_inherit.style_store.__all__.

Your style will then be available as ‘your_style’ (i.e. whatever you named the function).

Routine Listings

merge_numpy_docs merge_rest_docs merge_numpy_napoleon_docs merge_google_napoleon_docs

Functions

merge_numpy_docs([prnt_doc, child_doc, method])

Merge two numpy-style docstrings into a single docstring.

merge_rest_docs([prnt_doc, child_doc, method])

See custom_inherit.style_store.reST for details.

merge_numpy_napoleon_docs([prnt_doc, ...])

Merge two numpy-style docstrings into one numpy-napolean docstring.

merge_google_napoleon_docs([prnt_doc, ...])

Merge two google-style docstrings into one google-napoleon docstring.