scanpydoc.definition_list_typed_field#

Prettier function parameter documentation.

This extension replaces the default PyTypedField with a derivative DLTypedField, which renders item items (e.g. function parameters) as definition lists instead of simple paragraphs.

Functions#

setup(app)[source]#

Replace PyTypedField with ours.

Parameters:
app Sphinx

Sphinx app to set this extension up for

Return type:

dict[str, Any]

Returns:

Metadata for this extension.

Classes#

class DLTypedField(name, names=(), typenames=(), label='', rolename='', typerolename='', can_collapse=False)[source]#

A reStructuredText field-list renderer that creates definition lists.

This style is more readable than cramming name, type, and description in one line.

The class is not intended to be used directly, but by using the extension, it will be used instead of the default PyTypedField.

list_type[source]#

Override the list type

alias of definition_list

make_field(types, domain, items, env=None, **kw)[source]#

Render a field to a documenttree node representing a definition list item.

Return type:

field