Added attribute summary table to python module template

This commit is contained in:
Sam Morley-Short 2021-04-07 23:11:04 -07:00 committed by Ashley Whetter
parent 57253a9f84
commit 3fb14a24fc

View file

@ -60,6 +60,7 @@ Submodules
{% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %}
{% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %}
{% set visible_attributes = visible_children|selectattr("type", "equalto", "data")|list %}
{% if "show-module-summary" in autoapi_options and (visible_classes or visible_functions) %}
{% block classes scoped %}
{% if visible_classes %}
@ -88,6 +89,21 @@ Functions
{% endfor %}
{% endif %}
{% endblock %}
{% block attributes scoped %}
{% if visible_attributes %}
Attributes
~~~~~~~~~~
.. autoapisummary::
{% for attribute in visible_attributes %}
{{ attribute.id }}
{% endfor %}
{% endif %}
{% endblock %}
{% endif %}