scverse_doc.napoleon#

Prose return sections in NumPy-style docstrings.

sphinx.ext.napoleon reads a NumPy-style Returns section as a list of name : type entries. With this extension, it can be prose instead:

Returns
-------
The fitted model, or `None` if `copy` is false.

Lines that do look like name : type become an item linking to type.

If the section is a single definition list with n items, and the return type is a tuple with n members (or a union with such a tuple), each item is annotated with its member type, e.g. for a function annotated -> tuple[AnnData, AnnData]:

Returns
-------
train
    The training set.
test
    The test set.