diff options
Diffstat (limited to 'doc/_templates/autoapi/module.rst')
-rw-r--r-- | doc/_templates/autoapi/module.rst | 106 |
1 files changed, 76 insertions, 30 deletions
diff --git a/doc/_templates/autoapi/module.rst b/doc/_templates/autoapi/module.rst index 5c64bbec6..0ad8469a8 100644 --- a/doc/_templates/autoapi/module.rst +++ b/doc/_templates/autoapi/module.rst @@ -25,7 +25,17 @@ {##} .. currentmodule:: {{ node.name }} {##} -{%- block functions -%} + +{%- if node.variables %} + +**Variables** + +{% for item, obj in node.variables.items() -%} +- :py:data:`{{ item }}` + {#{ obj|summary }#} +{% endfor -%} +{%- endif -%} + {%- if node.functions %} **Functions** @@ -35,15 +45,19 @@ {{ obj|summary }} {% endfor -%} +{%- endif -%} -{% for item in node.functions %} -.. autofunction:: {{ item }} -{##} -{%- endfor -%} +{%- if node.exceptions %} + +**Exceptions** + +{% for item, obj in node.exceptions.items() -%} +- :py:exc:`{{ item }}`: + {{ obj|summary }} + +{% endfor -%} {%- endif -%} -{%- endblock -%} -{%- block classes -%} {%- if node.classes %} **Classes** @@ -53,18 +67,40 @@ {{ obj|summary }} {% endfor -%} +{%- endif -%} -{% for item in node.classes %} -.. autoclass:: {{ item }} - :members: - :private-members: - :special-members: - :inherited-members: - :exclude-members: __weakref__ +{%- block variables -%} +{%- if node.variables %} - .. rubric:: Inheritance - .. inheritance-diagram:: {{ item }} - :parts: 1 +--------------------- + +**Variables** + +{#% for item, obj in node.variables.items() -%} +- :py:data:`{{ item }}` +{% endfor -%#} + +{% for item, obj in node.variables.items() %} +.. autodata:: {{ item }} + :annotation: + + .. code-block:: text + + {{ obj|pprint|indent(6) }} +{##} +{%- endfor -%} +{%- endif -%} +{%- endblock -%} + +{%- block functions -%} +{%- if node.functions %} + +--------------------- + +**Functions** + +{% for item in node.functions %} +.. autofunction:: {{ item }} {##} {%- endfor -%} {%- endif -%} @@ -73,13 +109,15 @@ {%- block exceptions -%} {%- if node.exceptions %} +--------------------- + **Exceptions** -{% for item, obj in node.exceptions.items() -%} +{#% for item, obj in node.exceptions.items() -%} - :py:exc:`{{ item }}`: {{ obj|summary }} -{% endfor -%} +{% endfor -%#} {% for item in node.exceptions %} .. autoexception:: {{ item }} @@ -92,22 +130,30 @@ {%- endif -%} {%- endblock -%} -{%- block variables -%} -{%- if node.variables %} +{%- block classes -%} +{%- if node.classes %} -**Variables** +--------------------- -{% for item, obj in node.variables.items() -%} -- :py:data:`{{ item }}` -{% endfor -%} +**Classes** -{% for item, obj in node.variables.items() %} -.. autodata:: {{ item }} - :annotation: +{#% for item, obj in node.classes.items() -%} +- :py:class:`{{ item }}`: + {{ obj|summary }} - .. code-block:: text +{% endfor -%#} - {{ obj|pprint|indent(6) }} +{% for item in node.classes %} +.. autoclass:: {{ item }} + :members: + :private-members: + :special-members: + :inherited-members: + :exclude-members: __weakref__ + + .. rubric:: Inheritance + .. inheritance-diagram:: {{ item }} + :parts: 1 {##} {%- endfor -%} {%- endif -%} |