diff options
Diffstat (limited to 'doc/_templates')
-rw-r--r-- | doc/_templates/autoapi/module.rst | 121 |
1 files changed, 69 insertions, 52 deletions
diff --git a/doc/_templates/autoapi/module.rst b/doc/_templates/autoapi/module.rst index e359b32af..0ad8469a8 100644 --- a/doc/_templates/autoapi/module.rst +++ b/doc/_templates/autoapi/module.rst @@ -1,4 +1,9 @@ -{{ node.name }} +.. # Template modified by Patrick Lehmann + * removed automodule on top, because private members are activated for autodoc (no doubled documentation). + * Made sections like 'submodules' bold text, but no headlines to reduce number of ToC levels. + +=={{ '=' * node.name|length }}== +``{{ node.name }}`` =={{ '=' * node.name|length }}== .. automodule:: {{ node.name }} @@ -7,10 +12,9 @@ {%- block modules -%} {%- if subnodes %} -.. #----------------------------------- -{##} **Submodules** + .. toctree:: {% for item in subnodes %} {{ item.name }} @@ -22,21 +26,31 @@ .. currentmodule:: {{ node.name }} {##} -.. #----------------------------------- -{##} {%- if node.variables %} + **Variables** -{##} + {% for item, obj in node.variables.items() -%} - :py:data:`{{ item }}` + {#{ obj|summary }#} {% endfor -%} {%- endif -%} +{%- if node.functions %} + +**Functions** + +{% for item, obj in node.functions.items() -%} +- :py:func:`{{ item }}`: + {{ obj|summary }} + +{% endfor -%} +{%- endif -%} {%- if node.exceptions %} -{##} + **Exceptions** -{##} + {% for item, obj in node.exceptions.items() -%} - :py:exc:`{{ item }}`: {{ obj|summary }} @@ -44,11 +58,10 @@ {% endfor -%} {%- endif -%} - {%- if node.classes %} -{##} + **Classes** -{##} + {% for item, obj in node.classes.items() -%} - :py:class:`{{ item }}`: {{ obj|summary }} @@ -56,26 +69,22 @@ {% endfor -%} {%- endif -%} +{%- block variables -%} +{%- if node.variables %} -{%- if node.functions %} -{##} -**Functions** -{##} -{% for item, obj in node.functions.items() -%} -- :py:func:`{{ item }}`: - {{ obj|summary }} +--------------------- -{% endfor -%} -{%- endif -%} +**Variables** +{#% for item, obj in node.variables.items() -%} +- :py:data:`{{ item }}` +{% endfor -%#} -{%- block variables -%} -{%- if node.variables %} {% for item, obj in node.variables.items() %} .. autodata:: {{ item }} :annotation: - .. code-block:: guess + .. code-block:: text {{ obj|pprint|indent(6) }} {##} @@ -83,60 +92,68 @@ {%- endif -%} {%- endblock -%} +{%- block functions -%} +{%- if node.functions %} + +--------------------- + +**Functions** + +{% for item in node.functions %} +.. autofunction:: {{ item }} +{##} +{%- endfor -%} +{%- endif -%} +{%- endblock -%} {%- block exceptions -%} {%- if node.exceptions %} -.. #----------------------------------- +--------------------- + +**Exceptions** + +{#% for item, obj in node.exceptions.items() -%} +- :py:exc:`{{ item }}`: + {{ obj|summary }} + +{% endfor -%#} {% for item in node.exceptions %} .. autoexception:: {{ item }} - :members: - :private-members: - :inherited-members: - :undoc-members: -{##} + .. rubric:: Inheritance .. inheritance-diagram:: {{ item }} -{##} - .. rubric:: Members + :parts: 1 {##} {%- endfor -%} {%- endif -%} {%- endblock -%} - {%- block classes -%} {%- if node.classes %} -.. #----------------------------------- +--------------------- + +**Classes** + +{#% for item, obj in node.classes.items() -%} +- :py:class:`{{ item }}`: + {{ obj|summary }} + +{% endfor -%#} {% for item in node.classes %} .. autoclass:: {{ item }} :members: :private-members: - :undoc-members: + :special-members: :inherited-members: -{##} + :exclude-members: __weakref__ + .. rubric:: Inheritance .. inheritance-diagram:: {{ item }} -{##} - .. rubric:: Members -{##} -{%- endfor -%} -{%- endif -%} -{%- endblock -%} - - -{%- block functions -%} -{%- if node.functions %} - -.. #----------------------------------- - -**Functions** - -{% for item in node.functions %} -.. autofunction:: {{ item }} + :parts: 1 {##} {%- endfor -%} {%- endif -%} |