|
1 | 1 | {%- if docstring_sections -%} |
2 | | -{% for section in docstring_sections %} |
3 | | -{% if config.show_docstring_description and section.kind.value == "text" -%} |
4 | | -{{ section.value }} |
| 2 | +{%- for section in docstring_sections -%} |
| 3 | +{%- if config.show_docstring_description and section.kind.value == "text" -%} |
| 4 | +{{- section.value }} |
| 5 | + |
5 | 6 | {% elif config.show_docstring_attributes and section.kind.value == "attributes" -%} |
6 | | -{% include "docstring/attributes.md.jinja" with context -%} |
| 7 | +{%- include "docstring/attributes.md.jinja" with context %} |
| 8 | + |
7 | 9 | {% elif config.show_docstring_parameters and section.kind.value == "parameters" -%} |
8 | | -{% include "docstring/parameters.md.jinja" with context -%} |
| 10 | +{%- include "docstring/parameters.md.jinja" with context %} |
| 11 | + |
9 | 12 | {% elif config.show_docstring_other_parameters and section.kind.value == "other parameters" -%} |
10 | | -{% include "docstring/other_parameters.md.jinja" with context -%} |
| 13 | +{%- include "docstring/other_parameters.md.jinja" with context %} |
| 14 | + |
11 | 15 | {% elif config.show_docstring_raises and section.kind.value == "raises" -%} |
12 | | -{% include "docstring/raises.md.jinja" with context -%} |
| 16 | +{%- include "docstring/raises.md.jinja" with context %} |
| 17 | + |
13 | 18 | {% elif config.show_docstring_warns and section.kind.value == "warns" -%} |
14 | | -{% include "docstring/warns.md.jinja" with context -%} |
| 19 | +{%- include "docstring/warns.md.jinja" with context %} |
| 20 | + |
15 | 21 | {% elif config.show_docstring_yields and section.kind.value == "yields" -%} |
16 | | -{% include "docstring/yields.md.jinja" with context -%} |
| 22 | +{%- include "docstring/yields.md.jinja" with context %} |
| 23 | + |
17 | 24 | {% elif config.show_docstring_receives and section.kind.value == "receives" -%} |
18 | | -{% include "docstring/receives.md.jinja" with context -%} |
| 25 | +{%- include "docstring/receives.md.jinja" with context %} |
| 26 | + |
19 | 27 | {% elif config.show_docstring_returns and section.kind.value == "returns" -%} |
20 | | -{% include "docstring/returns.md.jinja" with context -%} |
| 28 | +{%- include "docstring/returns.md.jinja" with context %} |
| 29 | + |
21 | 30 | {% elif config.show_docstring_examples and section.kind.value == "examples" -%} |
22 | | -{% include "docstring/examples.md.jinja" with context -%} |
23 | | -{% elif config.show_docstring_description and section.kind.value == "admonition" -%} |
24 | | -{% include "docstring/admonition.md.jinja" with context -%} |
25 | | -{% endif %} |
26 | | -{% endfor %} |
| 31 | +{%- include "docstring/examples.md.jinja" with context -%} |
| 32 | + |
| 33 | +{%- elif config.show_docstring_description and section.kind.value == "admonition" -%} |
| 34 | +{%- include "docstring/admonition.md.jinja" with context %} |
| 35 | + |
| 36 | +{% endif -%} |
| 37 | +{%- endfor -%} |
27 | 38 | {%- endif -%} |
0 commit comments