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.

Classes

class DLTypedField(name, names=(), typenames=(), label=None, rolename=None, typerolename=None, can_collapse=False)

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

Override the list type

alias of definition_list

make_field(types, domain, items, env=None, **kw)

Render a field to a document-tree node representing a definition list item.

Return type

field

Functions

setup(app)

Replace PyTypedField with ours.

Parameters
app : Sphinx

Sphinx app to set this extension up for

Return type

{str: Any}Dict[str, Any]

Returns

Metadata for this extension.