I was thinking about getting rid of the condition on sections kind, and include
the subtemplate directly since their names are equal to the section kinds. But maybe the include
instruction costs more, so, would have to actually do some profiling.
{% if docstring_sections %}
{{ log.debug("Rendering docstring") }}
{% for section in docstring_sections %}
{% if config.show_docstring_description and section.kind.value == "text" %}
{{ section.value|convert_markdown(heading_level, html_id) }}
{% else %}
{% include "docstring/" ~ section.kind.value ~ ".html" with context %}
{% endif %}
{% endfor %}
{% endif %}
Each subtemplate would then check its config option config.show_docstring_attributes
etc.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too