diff options
| author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2022-06-22 09:00:42 +0200 | 
|---|---|---|
| committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2022-12-24 10:03:00 +0100 | 
| commit | 7f37dadcf570795169a24bf75f972949b067401b (patch) | |
| tree | 1ea4b2869e2f30bd37950b41a0bf3e210cfcfce8 | |
| parent | 26bb3c572eaffafafd8de8ef09b8acc34f91656f (diff) | |
| download | ghdl-7f37dadcf570795169a24bf75f972949b067401b.tar.gz ghdl-7f37dadcf570795169a24bf75f972949b067401b.tar.bz2 ghdl-7f37dadcf570795169a24bf75f972949b067401b.zip  | |
Updated autoapi template.
(cherry picked from commit 4977150c62f61abd9740f6b0386dc2340b13dd07)
| -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 -%}  | 
