* Propagated "maxdepth" recursively through package documents.

This commit is contained in:
Sergio Garcia Prado 2020-03-14 22:19:27 +01:00
parent 5caaa5534b
commit 06b54c0a1f
No known key found for this signature in database
GPG Key ID: EA4A45EB437CCDA9
2 changed files with 2 additions and 0 deletions

View File

@ -175,6 +175,7 @@ def create_package_file(root: str, master_package: str, subroot: str, py_files:
'separatemodules': opts.separatemodules,
'automodule_options': options,
'show_headings': not opts.noheadings,
'maxdepth': opts.maxdepth,
}
text = ReSTRenderer([user_template_dir, template_dir]).render('package.rst_t', context)
write_file(pkgname, text, opts)

View File

@ -7,6 +7,7 @@
{%- macro toctree(docnames) -%}
.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}