{% import "macros.html" as ui %} {% include "header.html" %} {% set role = page_role(state, entity) %} {% call ui.section("description", "Description", divider=true) %} {% set texts = other_sections(entity) | selectattr("kind", "equalto", "text") | list %} {% if texts %}
{% for section in texts %}{{ section.text | markdown | safe }}{% endfor %}
{% else %}

No docstring.

{% endif %} {% endcall %} {% call ui.section(role, "Signature", name="signature", divider=true) %} {% if entity.decorators %}

{% for decorator in entity.decorators %}@{{ decorator }}{% endfor %}

{% endif %}
{{ signature(entity) | highlight(entity.language) }}
{{ ui.previous_names(previous_names) }} {% if entity.kind == "class" and entity.bases %}

Bases: {% for base in entity.bases %}{{ base }}{% endfor %}

{% endif %} {% endcall %} {% set rows = parameter_rows(entity) %} {% if rows %} {% call ui.section(role, "Parameters", count=rows | length, name="parameters", divider=true) %} {% for row in rows %} {% endfor %}
NameTypeDefaultDescription
{{ row.name }} {% if row.annotation %}{{ row.annotation }}{% else %}-{% endif %} {% if row.default %}{{ row.default }}{% else %}-{% endif %} {% if row.description %}{{ row.description | markdown | safe }}{% else %}-{% endif %}
{% endcall %} {% endif %} {% set documented = other_sections(entity) | rejectattr("kind", "equalto", "text") | list %} {% if entity.kind == "function" and entity.returns and not documented | selectattr("kind", "equalto", "returns") | list %} {% call ui.section("returns", "Returns", divider=true) %}

{{ entity.returns }}

{% endcall %} {% endif %} {% for section in documented %} {% set count = section["items"] | length %} {% call ui.section(section.kind, section.title or section.kind, count=count if count > 1 else none, divider=true) %} {% if section.text %}{{ section.text | markdown | safe }}{% endif %} {% if section["items"] %} {% endif %} {% endcall %} {% endfor %} {% if entity.kind == "class" %} {% with divider = true %}{% include "members.html" %}{% endwith %} {% endif %} {{ ui.relations(relations, role) }} {% if database_use and database_use.total %} {# The tables and columns it uses (its members' too), found by reading the code: the mirror of an object's Use in the code. #} {% from "database.html" import code_cell %} {% call ui.section("source", "Database use", count=database_use.total, name="database-use", divider=true) %} {% call(row, key, value) ui.list_table("database-use", "", database_use, "", interactive=False) %}{{ code_cell(row, key) }}{% endcall %} {% endcall %} {% endif %} {% if not modal %}{{ ui.local_graph(entity.path, role) }}{% endif %} {{ ui.source(entity, code_theme, code_themes) }}