From 3233bc0ac7a756bb5a7dc1ffe3189aeca9eab01d Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 27 Jun 2017 17:12:17 -0700 Subject: [PATCH] Fix templates to nest functions and use short names --- autoapi/templates/index.rst | 4 +--- autoapi/templates/python/function.rst | 2 +- autoapi/templates/python/module.rst | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/autoapi/templates/index.rst b/autoapi/templates/index.rst index 0a80174..78bc84e 100644 --- a/autoapi/templates/index.rst +++ b/autoapi/templates/index.rst @@ -12,7 +12,5 @@ Below is a list of all items that are documented here. {# Force whitespace #} {%- for page in pages %} - {%- if page.top_level_object %} - {{ page.include_path }} - {%- endif %} + {{ page }} {%- endfor %} diff --git a/autoapi/templates/python/function.rst b/autoapi/templates/python/function.rst index 8412892..08aef29 100644 --- a/autoapi/templates/python/function.rst +++ b/autoapi/templates/python/function.rst @@ -1,6 +1,6 @@ {%- if obj.display %} -.. function:: {{ obj.name }}({{ obj.args|join(',') }}) +.. function:: {{ obj.short_name }}({{ obj.args|join(',') }}) {% if obj.docstring %} {{ obj.docstring|prepare_docstring|indent(3) }} diff --git a/autoapi/templates/python/module.rst b/autoapi/templates/python/module.rst index 40778a8..e9b1490 100644 --- a/autoapi/templates/python/module.rst +++ b/autoapi/templates/python/module.rst @@ -6,6 +6,7 @@ {%- if obj.docstring %} .. autoapi-nested-parse:: + {{ obj.docstring|prepare_docstring|indent(3) }} {% endif %}