8000 refactor: Mark all Jinja blocks as scoped · mkdocstrings/python@548bdad · GitHub
[go: up one dir, main page]

Skip to content

Commit 548bdad

Browse files
committed
refactor: Mark all Jinja blocks as scoped
1 parent d70cd9d commit 548bdad

File tree

11 files changed

+33
-33
lines changed

11 files changed

+33
-33
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Attributes:") }}</strong></p>
88
<table>
99
<thead>
@@ -35,7 +35,7 @@
3535
</table>
3636
{% endblock table_style %}
3737
{% elif config.docstring_section_style == "list" %}
38-
{% block list_style %}
38+
{% block list_style scoped %}
3939
<p>{{ section.title or lang.t("Attributes:") }}</p>
4040
<ul>
4141
{% for attribute in section.value %}
@@ -55,7 +55,7 @@
5555
</ul>
5656
{% endblock list_style %}
5757
{% elif config.docstring_section_style == "spacy" %}
58-
{% block spacy_style %}
58+
{% block spacy_style scoped %}
5959
<table>
6060
<thead>
6161
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Classes:") }}</strong></p>
88
<table>
99
<thead>
@@ -27,7 +27,7 @@
2727
</table>
2828
{% endblock table_style %}
2929
{% elif config.docstring_section_style == "list" %}
30-
{% block list_style %}
30+
{% block list_style scoped %}
3131
<p>{{ section.title or lang.t("Classes:") }}</p>
3232
<ul>
3333
{% for class in section.value %}
@@ -42,7 +42,7 @@
4242
</ul>
4343
{% endblock list_style %}
4444
{% elif config.docstring_section_style == "spacy" %}
45-
{% block spacy_style %}
45+
{% block spacy_style scoped %}
4646
<table>
4747
<thead>
4848
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}</strong></p>
88
<table>
99
<thead>
@@ -29,7 +29,7 @@
2929
</table>
3030
{% endblock table_style %}
3131
{% elif config.docstring_section_style == "list" %}
32-
{% block list_style %}
32+
{% block list_style scoped %}
3333
<p>{{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}</p>
3434
<ul>
3535
{% for function in section.value %}
@@ -46,7 +46,7 @@
4646
</ul>
4747
{% endblock list_style %}
4848
{% elif config.docstring_section_style == "spacy" %}
49-
{% block spacy_style %}
49+
{% block spacy_style scoped %}
5050
<table>
5151
<thead>
5252
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Modules:") }}</strong></p>
88
<table>
99
<thead>
@@ -27,7 +27,7 @@
2727
</table>
2828
{% endblock table_style %}
2929
{% elif config.docstring_section_style == "list" %}
30-
{% block list_style %}
30+
{% block list_style scoped %}
3131
<p>{{ section.title or lang.t("Modules:") }}</p>
3232
<ul>
3333
{% for module in section.value %}
@@ -42,7 +42,7 @@
4242
</ul>
4343
{% endblock list_style %}
4444
{% elif config.docstring_section_style == "spacy" %}
45-
{% block spacy_style %}
45+
{% block spacy_style scoped %}
4646
<table>
4747
<thead>
4848
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Other Parameters:") }}</strong></p>
88
<table>
99
<thead>
@@ -35,7 +35,7 @@
3535
</table>
3636
{% endblock table_style %}
3737
{% elif config.docstring_section_style == "list" %}
38-
{% block list_style %}
38+
{% block list_style scoped %}
3939
<p>{{ section.title or lang.t("Other Parameters:") }}</p>
4040
<ul>
4141
{% for parameter in section.value %}
@@ -55,7 +55,7 @@
5555
</ul>
5656
{% endblock list_style %}
5757
{% elif config.docstring_section_style == "spacy" %}
58-
{% block spacy_style %}
58+
{% block spacy_style scoped %}
5959
<table>
6060
<thead>
6161
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Parameters:") }}</strong></p>
88
<table>
99
<thead>
@@ -45,7 +45,7 @@
4545
</table>
4646
{% endblock table_style %}
4747
{% elif config.docstring_section_style == "list" %}
48-
{% block list_style %}
48+
{% block list_style scoped %}
4949
<p>{{ section.title or lang.t("Parameters:") }}</p>
5050
<ul>
5151
{% for parameter in section.value %}
@@ -70,7 +70,7 @@
7070
</ul>
7171
{% endblock list_style %}
7272
{% elif config.docstring_section_style == "spacy" %}
73-
{% block spacy_style %}
73+
{% block spacy_style scoped %}
7474
<table>
7575
<thead>
7676
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Raises:") }}</strong></p>
88
<table>
99
<thead>
@@ -33,7 +33,7 @@
3333
</table>
3434
{% endblock table_style %}
3535
{% elif config.docstring_section_style == "list" %}
36-
{% block list_style %}
36+
{% block list_style scoped %}
3737
<p>{{ lang.t(section.title) or lang.t("Raises:") }}</p>
3838
<ul>
3939
{% for raises in section.value %}
@@ -52,7 +52,7 @@
5252
</ul>
5353
{% endblock list_style %}
5454
{% elif config.docstring_section_style == "spacy" %}
55-
{% block spacy_style %}
55+
{% block spacy_style scoped %}
5656
<table>
5757
<thead>
5858
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
< 10000 /code>
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
{% set name_column = section.value|selectattr("name")|any %}
88
<p><strong>{{ section.title or lang.t("Receives:") }}</strong></p>
99
<table>
@@ -36,7 +36,7 @@
3636
</table>
3737
{% endblock table_style %}
3838
{% elif config.docstring_section_style == "list" %}
39-
{% block list_style %}
39+
{% block list_style scoped %}
4040
<p>{{ section.title or lang.t("Receives:") }}</p>
4141
<ul>
4242
{% for receives in section.value %}
@@ -58,7 +58,7 @@
5858
</ul>
5959
{% endblock list_style %}
6060
{% elif config.docstring_section_style == "spacy" %}
61-
{% block spacy_style %}
61+
{% block spacy_style scoped %}
6262
<table>
6363
<thead>
6464
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
{% set name_column = section.value|selectattr("name")|any %}
88
<p><strong>{{ section.title or lang.t("Returns:") }}</strong></p>
99
<table>
@@ -36,7 +36,7 @@
3636
</table>
3737
{% endblock table_style %}
3838
{% elif config.docstring_section_style == "list" %}
39-
{% block list_style %}
39+
{% block list_style scoped %}
4040
<p>{{ section.title or lang.t("Returns:") }}</p>
4141
<ul>
4242
{% for returns in section.value %}
@@ -58,7 +58,7 @@
5858
</ul>
5959
{% endblock list_style %}
6060
{% elif config.docstring_section_style == "spacy" %}
61-
{% block spacy_style %}
61+
{% block spacy_style scoped %}
6262
<table>
6363
<thead>
6464
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
<p><strong>{{ section.title or lang.t("Warns:") }}</strong></p>
88
<table>
99
<thead>
@@ -33,7 +33,7 @@
3333
</table>
3434
{% endblock table_style %}
3535
{% elif config.docstring_section_style == "list" %}
36-
{% block list_style %}
36+
{% block list_style scoped %}
3737
<p>{{ section.title or lang.t("Warns:") }}</p>
3838
<ul>
3939
{% for warns in section.value %}
@@ -52,7 +52,7 @@
5252
</ul>
5353
{% endblock list_style %}
5454
{% elif config.docstring_section_style == "spacy" %}
55-
{% block spacy_style %}
55+
{% block spacy_style scoped %}
5656
<table>
5757
<thead>
5858
<tr>

src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html

Lines chang D504 ed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% import "language.html" as lang with context %}
44

55
{% if config.docstring_section_style == "table" %}
6-
{% block table_style %}
6+
{% block table_style scoped %}
77
{% set name_column = section.value|selectattr("name")|any %}
88
<p><strong>{{ section.title or lang.t("Yields:") }}</strong></p>
99
<table>
@@ -36,7 +36,7 @@
3636
</table>
3737
{% endblock table_style %}
3838
{% elif config.docstring_section_style == "list" %}
39-
{% block list_style %}
39+
{% block list_style scoped %}
4040
<p>{{ section.title or lang.t("Yields:") }}</p>
4141
<ul>
4242
{% for yields in section.value %}
@@ -58,7 +58,7 @@
5858
</ul>
5959
{% endblock list_style %}
6060
{% elif config.docstring_section_style == "spacy" %}
61-
{% block spacy_style %}
61+
{% block spacy_style scoped %}
6262
<table>
6363
<thead>
6464
<tr>

0 commit comments

Comments
 (0)
0