diff options
Diffstat (limited to 'doc/_templates')
-rw-r--r-- | doc/_templates/autoapi/module.rst | 129 |
1 files changed, 50 insertions, 79 deletions
diff --git a/doc/_templates/autoapi/module.rst b/doc/_templates/autoapi/module.rst index e359b32af..5c64bbec6 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 }} @@ -21,122 +25,89 @@ {##} .. currentmodule:: {{ node.name }} {##} - -.. #----------------------------------- -{##} -{%- if node.variables %} -**Variables** -{##} -{% for item, obj in node.variables.items() -%} -- :py:data:`{{ item }}` -{% endfor -%} -{%- endif -%} - - -{%- if node.exceptions %} -{##} -**Exceptions** -{##} -{% for item, obj in node.exceptions.items() -%} -- :py:exc:`{{ item }}`: - {{ obj|summary }} - -{% endfor -%} -{%- endif -%} - - -{%- if node.classes %} -{##} -**Classes** -{##} -{% for item, obj in node.classes.items() -%} -- :py:class:`{{ item }}`: - {{ obj|summary }} - -{% endfor -%} -{%- endif -%} - - +{%- block functions -%} {%- if node.functions %} -{##} + **Functions** -{##} + {% for item, obj in node.functions.items() -%} - :py:func:`{{ item }}`: {{ obj|summary }} {% endfor -%} -{%- endif -%} - -{%- block variables -%} -{%- if node.variables %} -{% for item, obj in node.variables.items() %} -.. autodata:: {{ item }} - :annotation: - - .. code-block:: guess - - {{ obj|pprint|indent(6) }} +{% for item in node.functions %} +.. autofunction:: {{ item }} {##} {%- endfor -%} {%- endif -%} {%- endblock -%} +{%- block classes -%} +{%- if node.classes %} -{%- block exceptions -%} -{%- if node.exceptions %} +**Classes** + +{% for item, obj in node.classes.items() -%} +- :py:class:`{{ item }}`: + {{ obj|summary }} -.. #----------------------------------- +{% endfor -%} -{% for item in node.exceptions %} -.. autoexception:: {{ item }} +{% for item in node.classes %} +.. autoclass:: {{ item }} :members: :private-members: + :special-members: :inherited-members: - :undoc-members: -{##} + :exclude-members: __weakref__ + .. rubric:: Inheritance .. inheritance-diagram:: {{ item }} -{##} - .. rubric:: Members + :parts: 1 {##} {%- endfor -%} {%- endif -%} {%- endblock -%} +{%- block exceptions -%} +{%- if node.exceptions %} -{%- block classes -%} -{%- if node.classes %} +**Exceptions** -.. #----------------------------------- +{% for item, obj in node.exceptions.items() -%} +- :py:exc:`{{ item }}`: + {{ obj|summary }} + +{% endfor -%} + +{% for item in node.exceptions %} +.. autoexception:: {{ item }} -{% for item in node.classes %} -.. autoclass:: {{ item }} - :members: - :private-members: - :undoc-members: - :inherited-members: -{##} .. rubric:: Inheritance .. inheritance-diagram:: {{ item }} -{##} - .. rubric:: Members + :parts: 1 {##} {%- endfor -%} {%- endif -%} {%- endblock -%} +{%- block variables -%} +{%- if node.variables %} -{%- block functions -%} -{%- if node.functions %} +**Variables** -.. #----------------------------------- +{% for item, obj in node.variables.items() -%} +- :py:data:`{{ item }}` +{% endfor -%} -**Functions** +{% for item, obj in node.variables.items() %} +.. autodata:: {{ item }} + :annotation: -{% for item in node.functions %} -.. autofunction:: {{ item }} + .. code-block:: text + + {{ obj|pprint|indent(6) }} {##} {%- endfor -%} {%- endif -%} |