mkdocstrings-python 1.18.2__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. mkdocstrings_handlers/python/__init__.py +0 -4
  2. mkdocstrings_handlers/python/_internal/config.py +20 -48
  3. mkdocstrings_handlers/python/_internal/debug.py +1 -1
  4. mkdocstrings_handlers/python/_internal/handler.py +26 -45
  5. mkdocstrings_handlers/python/_internal/rendering.py +50 -113
  6. mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja +2 -4
  7. mkdocstrings_handlers/python/templates/material/_base/backlinks.html.jinja +49 -0
  8. mkdocstrings_handlers/python/templates/material/_base/class.html.jinja +58 -18
  9. mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja +4 -8
  10. mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja +1 -2
  11. mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja +1 -2
  12. mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja +1 -2
  13. mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja +1 -2
  14. mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja +4 -8
  15. mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja +7 -14
  16. mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja +4 -8
  17. mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja +5 -10
  18. mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja +5 -10
  19. mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja +1 -1
  20. mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja +9 -9
  21. mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja +4 -8
  22. mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja +5 -10
  23. mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja +15 -30
  24. mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja +3 -0
  25. mkdocstrings_handlers/python/templates/material/_base/function.html.jinja +6 -10
  26. mkdocstrings_handlers/python/templates/material/_base/language.html.jinja +3 -6
  27. mkdocstrings_handlers/python/templates/material/_base/module.html.jinja +4 -8
  28. mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja +3 -6
  29. mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja +1 -2
  30. mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja +1 -2
  31. mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja +1 -2
  32. mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja +1 -2
  33. mkdocstrings_handlers/python/templates/material/_base/summary/type_aliases.html.jinja +1 -2
  34. mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja +5 -10
  35. mkdocstrings_handlers/python/templates/material/_base/type_alias.html.jinja +3 -6
  36. mkdocstrings_handlers/python/templates/material/_base/type_parameters.html.jinja +2 -4
  37. mkdocstrings_handlers/python/templates/material/style.css +24 -0
  38. mkdocstrings_handlers/python/templates/readthedocs/_base/class.html +11 -0
  39. mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja +251 -0
  40. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja +2 -4
  41. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja +2 -4
  42. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja +3 -6
  43. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja +2 -4
  44. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja +2 -4
  45. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja +2 -4
  46. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja +2 -4
  47. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja +2 -4
  48. mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja +3 -6
  49. mkdocstrings_handlers/python/templates/{material → readthedocs}/class.html +0 -1
  50. mkdocstrings_handlers/python/templates/readthedocs/class.html.jinja +1 -0
  51. mkdocstrings_python-2.0.0.dist-info/METADATA +179 -0
  52. mkdocstrings_python-2.0.0.dist-info/RECORD +121 -0
  53. {mkdocstrings_python-1.18.2.dist-info → mkdocstrings_python-2.0.0.dist-info}/WHEEL +1 -1
  54. mkdocstrings_handlers/python/config.py +0 -17
  55. mkdocstrings_handlers/python/handler.py +0 -17
  56. mkdocstrings_handlers/python/rendering.py +0 -17
  57. mkdocstrings_handlers/python/templates/material/_base/attribute.html +0 -10
  58. mkdocstrings_handlers/python/templates/material/_base/children.html +0 -10
  59. mkdocstrings_handlers/python/templates/material/_base/class.html +0 -10
  60. mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html +0 -10
  61. mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +0 -10
  62. mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +0 -10
  63. mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +0 -10
  64. mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +0 -10
  65. mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +0 -10
  66. mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +0 -10
  67. mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +0 -10
  68. mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +0 -10
  69. mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +0 -10
  70. mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +0 -10
  71. mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html +0 -10
  72. mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html +0 -10
  73. mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +0 -10
  74. mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +0 -10
  75. mkdocstrings_handlers/python/templates/material/_base/docstring.html +0 -10
  76. mkdocstrings_handlers/python/templates/material/_base/expression.html +0 -10
  77. mkdocstrings_handlers/python/templates/material/_base/function.html +0 -10
  78. mkdocstrings_handlers/python/templates/material/_base/labels.html +0 -10
  79. mkdocstrings_handlers/python/templates/material/_base/language.html +0 -10
  80. mkdocstrings_handlers/python/templates/material/_base/languages/en.html +0 -10
  81. mkdocstrings_handlers/python/templates/material/_base/languages/ja.html +0 -10
  82. mkdocstrings_handlers/python/templates/material/_base/languages/zh.html +0 -10
  83. mkdocstrings_handlers/python/templates/material/_base/module.html +0 -10
  84. mkdocstrings_handlers/python/templates/material/_base/signature.html +0 -10
  85. mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html +0 -10
  86. mkdocstrings_handlers/python/templates/material/_base/summary/classes.html +0 -10
  87. mkdocstrings_handlers/python/templates/material/_base/summary/functions.html +0 -10
  88. mkdocstrings_handlers/python/templates/material/_base/summary/modules.html +0 -10
  89. mkdocstrings_handlers/python/templates/material/_base/summary/type_aliases.html +0 -10
  90. mkdocstrings_handlers/python/templates/material/_base/summary.html +0 -10
  91. mkdocstrings_handlers/python/templates/material/_base/type_alias.html +0 -10
  92. mkdocstrings_handlers/python/templates/material/_base/type_parameters.html +0 -10
  93. mkdocstrings_handlers/python/templates/material/attribute.html +0 -2
  94. mkdocstrings_handlers/python/templates/material/children.html +0 -2
  95. mkdocstrings_handlers/python/templates/material/docstring/admonition.html +0 -2
  96. mkdocstrings_handlers/python/templates/material/docstring/attributes.html +0 -2
  97. mkdocstrings_handlers/python/templates/material/docstring/classes.html +0 -2
  98. mkdocstrings_handlers/python/templates/material/docstring/examples.html +0 -2
  99. mkdocstrings_handlers/python/templates/material/docstring/functions.html +0 -2
  100. mkdocstrings_handlers/python/templates/material/docstring/modules.html +0 -2
  101. mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html +0 -2
  102. mkdocstrings_handlers/python/templates/material/docstring/parameters.html +0 -2
  103. mkdocstrings_handlers/python/templates/material/docstring/raises.html +0 -2
  104. mkdocstrings_handlers/python/templates/material/docstring/receives.html +0 -2
  105. mkdocstrings_handlers/python/templates/material/docstring/returns.html +0 -2
  106. mkdocstrings_handlers/python/templates/material/docstring/warns.html +0 -2
  107. mkdocstrings_handlers/python/templates/material/docstring/yields.html +0 -2
  108. mkdocstrings_handlers/python/templates/material/docstring.html +0 -2
  109. mkdocstrings_handlers/python/templates/material/expression.html +0 -2
  110. mkdocstrings_handlers/python/templates/material/function.html +0 -2
  111. mkdocstrings_handlers/python/templates/material/labels.html +0 -2
  112. mkdocstrings_handlers/python/templates/material/language.html +0 -2
  113. mkdocstrings_handlers/python/templates/material/languages/en.html +0 -2
  114. mkdocstrings_handlers/python/templates/material/languages/ja.html +0 -2
  115. mkdocstrings_handlers/python/templates/material/languages/zh.html +0 -2
  116. mkdocstrings_handlers/python/templates/material/module.html +0 -2
  117. mkdocstrings_handlers/python/templates/material/signature.html +0 -2
  118. mkdocstrings_handlers/python/templates/material/summary/attributes.html +0 -2
  119. mkdocstrings_handlers/python/templates/material/summary/classes.html +0 -2
  120. mkdocstrings_handlers/python/templates/material/summary/functions.html +0 -2
  121. mkdocstrings_handlers/python/templates/material/summary/modules.html +0 -2
  122. mkdocstrings_handlers/python/templates/material/summary.html +0 -2
  123. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html +0 -10
  124. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html +0 -10
  125. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html +0 -10
  126. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html +0 -10
  127. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html +0 -10
  128. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html +0 -10
  129. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html +0 -10
  130. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html +0 -10
  131. mkdocstrings_handlers/python/templates/readthedocs/_base/language.html +0 -10
  132. mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html +0 -10
  133. mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html +0 -10
  134. mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html +0 -10
  135. mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html +0 -2
  136. mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html +0 -2
  137. mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html +0 -2
  138. mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html +0 -2
  139. mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html +0 -2
  140. mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html +0 -2
  141. mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html +0 -2
  142. mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html +0 -2
  143. mkdocstrings_handlers/python/templates/readthedocs/language.html +0 -2
  144. mkdocstrings_handlers/python/templates/readthedocs/languages/en.html +0 -2
  145. mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html +0 -2
  146. mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html +0 -2
  147. mkdocstrings_python-1.18.2.dist-info/METADATA +0 -117
  148. mkdocstrings_python-1.18.2.dist-info/RECORD +0 -211
  149. {mkdocstrings_python-1.18.2.dist-info → mkdocstrings_python-2.0.0.dist-info}/entry_points.txt +0 -0
  150. {mkdocstrings_python-1.18.2.dist-info → mkdocstrings_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug("Rendering yields section") }}
16
16
  {% endblock logs %}
17
17
 
18
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
19
- {% import "language"|get_template as lang with context %}
18
+ {% import "language.html.jinja" as lang with context %}
20
19
  {#- Language module providing the `t` translation method. -#}
21
20
 
22
21
  {% if config.docstring_section_style == "table" %}
@@ -39,8 +38,7 @@ Context:
39
38
  <td>
40
39
  {% if yields.annotation %}
41
40
  {% with expression = yields.annotation, backlink_type = "yielded-by" %}
42
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
43
- <code>{% include "expression"|get_template with context %}</code>
41
+ <code>{% include "expression.html.jinja" with context %}</code>
44
42
  {% endwith %}
45
43
  {% endif %}
46
44
  </td>
@@ -65,8 +63,7 @@ Context:
65
63
  {% if yields.annotation %}
66
64
  {% with expression = yields.annotation, backlink_type = "yielded-by" %}
67
65
  {% if yields.name %} ({% endif %}
68
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
69
- <code>{% include "expression"|get_template with context %}</code>
66
+ <code>{% include "expression.html.jinja" with context %}</code>
70
67
  {% if yields.name %}){% endif %}
71
68
  {% endwith %}
72
69
  {% endif %}
@@ -97,8 +94,7 @@ Context:
97
94
  {% elif yields.annotation %}
98
95
  <span class="doc-yields-annotation">
99
96
  {% with expression = yields.annotation, backlink_type = "yielded-by" %}
100
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
101
- <code>{% include "expression"|get_template with context %}</code>
97
+ <code>{% include "expression.html.jinja" with context %}</code>
102
98
  {% endwith %}
103
99
  </span>
104
100
  {% endif %}
@@ -112,8 +108,7 @@ Context:
112
108
  <span class="doc-yields-annotation">
113
109
  <b>{{ lang.t("TYPE:") }}:</b>
114
110
  {% with expression = yields.annotation, backlink_type = "yielded-by" %}
115
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
116
- <code>{% include "expression"|get_template with context %}</code>
111
+ <code>{% include "expression.html.jinja" with context %}</code>
117
112
  {% endwith %}
118
113
  </span>
119
114
  </p>
@@ -24,50 +24,35 @@ Context:
24
24
  {% if config.show_docstring_description and section.kind.value == "text" %}
25
25
  {{ section.value|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
26
26
  {% elif config.show_docstring_attributes and section.kind.value == "attributes" %}
27
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
28
- {% include "docstring/attributes"|get_template with context %}
27
+ {% include "docstring/attributes.html.jinja" with context %}
29
28
  {% elif config.show_docstring_functions and section.kind.value == "functions" %}
30
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
31
- {% include "docstring/functions"|get_template with context %}
29
+ {% include "docstring/functions.html.jinja" with context %}
32
30
  {% elif config.show_docstring_classes and section.kind.value == "classes" %}
33
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
34
- {% include "docstring/classes"|get_template with context %}
31
+ {% include "docstring/classes.html.jinja" with context %}
35
32
  {% elif config.show_docstring_type_aliases and section.kind.value == "type aliases" %}
36
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
37
- {% include "docstring/type_aliases"|get_template with context %}
33
+ {% include "docstring/type_aliases.html.jinja" with context %}
38
34
  {% elif config.show_docstring_modules and section.kind.value == "modules" %}
39
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
40
- {% include "docstring/modules"|get_template with context %}
35
+ {% include "docstring/modules.html.jinja" with context %}
41
36
  {% elif config.show_docstring_type_parameters and section.kind.value == "type parameters" %}
42
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
43
- {% include "docstring/type_parameters"|get_template with context %}
37
+ {% include "docstring/type_parameters.html.jinja" with context %}
44
38
  {% elif config.show_docstring_parameters and section.kind.value == "parameters" %}
45
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
46
- {% include "docstring/parameters"|get_template with context %}
39
+ {% include "docstring/parameters.html.jinja" with context %}
47
40
  {% elif config.show_docstring_other_parameters and section.kind.value == "other parameters" %}
48
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
49
- {% include "docstring/other_parameters"|get_template with context %}
41
+ {% include "docstring/other_parameters.html.jinja" with context %}
50
42
  {% elif config.show_docstring_raises and section.kind.value == "raises" %}
51
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
52
- {% include "docstring/raises"|get_template with context %}
43
+ {% include "docstring/raises.html.jinja" with context %}
53
44
  {% elif config.show_docstring_warns and section.kind.value == "warns" %}
54
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
55
- {% include "docstring/warns"|get_template with context %}
45
+ {% include "docstring/warns.html.jinja" with context %}
56
46
  {% elif config.show_docstring_yields and section.kind.value == "yields" %}
57
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
58
- {% include "docstring/yields"|get_template with context %}
47
+ {% include "docstring/yields.html.jinja" with context %}
59
48
  {% elif config.show_docstring_receives and section.kind.value == "receives" %}
60
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
61
- {% include "docstring/receives"|get_template with context %}
49
+ {% include "docstring/receives.html.jinja" with context %}
62
50
  {% elif config.show_docstring_returns and section.kind.value == "returns" %}
63
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
64
- {% include "docstring/returns"|get_template with context %}
51
+ {% include "docstring/returns.html.jinja" with context %}
65
52
  {% elif config.show_docstring_examples and section.kind.value == "examples" %}
66
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
67
- {% include "docstring/examples"|get_template with context %}
53
+ {% include "docstring/examples.html.jinja" with context %}
68
54
  {% elif config.show_docstring_description and section.kind.value == "admonition" %}
69
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
70
- {% include "docstring/admonition"|get_template with context %}
55
+ {% include "docstring/admonition.html.jinja" with context %}
71
56
  {% endif %}
72
57
  {% endfor %}
73
58
  {% endwith %}
@@ -166,4 +166,7 @@ Context:
166
166
  {%- endif -%}
167
167
  {%- endmacro -%}
168
168
 
169
+ {%- if config.modernize_annotations and expression is not string -%}
170
+ {%- set expression = expression.modernize() -%}
171
+ {%- endif -%}
169
172
  {{ render(expression, config.annotations_path, backlink_type|default("")) }}
@@ -17,8 +17,7 @@ Context:
17
17
  {{ log.debug("Rendering " + function.path) }}
18
18
  {% endblock logs %}
19
19
 
20
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
21
- {% import "language"|get_template as lang with context %}
20
+ {% import "language.html.jinja" as lang with context %}
22
21
  {#- Language module providing the `t` translation method. -#}
23
22
 
24
23
  <div class="doc doc-object doc-function">
@@ -62,9 +61,8 @@ Context:
62
61
  {% else %}
63
62
  {%+ filter highlight(language="python", inline=True) -%}
64
63
  {{ function_name }}
65
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within block. -#}
66
- {%- include "type_parameters"|get_template with context -%}
67
- {%- include "signature"|get_template with context -%}
64
+ {%- include "type_parameters.html.jinja" with context -%}
65
+ {%- include "signature.html.jinja" with context -%}
68
66
  {%- endfilter %}
69
67
  {% endif %}
70
68
  {% endblock heading %}
@@ -75,8 +73,7 @@ Context:
75
73
  This block renders the labels for the function.
76
74
  -#}
77
75
  {% with labels = function.labels %}
78
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
79
- {% include "labels"|get_template with context %}
76
+ {% include "labels.html.jinja" with context %}
80
77
  {% endwith %}
81
78
  {% endblock labels %}
82
79
 
@@ -134,8 +131,7 @@ Context:
134
131
  This block renders the docstring for the function.
135
132
  -#}
136
133
  {% with docstring_sections = function.docstring.parsed %}
137
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
138
- {% include "docstring"|get_template with context %}
134
+ {% include "docstring.html.jinja" with context %}
139
135
  {% endwith %}
140
136
  {% endblock docstring %}
141
137
 
@@ -149,7 +145,7 @@ Context:
149
145
  This block renders the source code for the function.
150
146
  -#}
151
147
  {% if config.show_source and function.source %}
152
- <details class="quote">
148
+ <details class="mkdocstrings-source">
153
149
  <summary>{{ lang.t("Source code in") }} <code>
154
150
  {%- if function.relative_filepath.is_absolute() -%}
155
151
  {{ function.relative_package_filepath }}
@@ -7,15 +7,12 @@
7
7
  -#}
8
8
  {% endblock logs %}
9
9
 
10
- {# YORE: Bump 2: Replace `| get_template` with `~ ".html.jinja"` within line. #}
11
- {% set lang_pth = "languages/" ~ locale | get_template %}
10
+ {% set lang_pth = "languages/" ~ locale ~ ".html.jinja" %}
12
11
  {% if lang_pth is existing_template %}
13
12
  {% import lang_pth as lang %}
14
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
15
- {% import "languages/en"|get_template as fallback %}
13
+ {% import "languages/en.html.jinja" as fallback %}
16
14
  {% macro t(key) %}{{ lang.t(key) or fallback.t(key) }}{% endmacro %}
17
15
  {% else %}
18
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
19
- {% import "languages/en"|get_template as lang %}
16
+ {% import "languages/en.html.jinja" as lang %}
20
17
  {% macro t(key) %}{{ lang.t(key) }}{% endmacro %}
21
18
  {% endif %}
@@ -63,8 +63,7 @@ Context:
63
63
  This block renders the labels for the module.
64
64
  -#}
65
65
  {% with labels = module.labels %}
66
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
67
- {% include "labels"|get_template with context %}
66
+ {% include "labels.html.jinja" with context %}
68
67
  {% endwith %}
69
68
  {% endblock labels %}
70
69
 
@@ -98,8 +97,7 @@ Context:
98
97
  This block renders the docstring for the module.
99
98
  -#}
100
99
  {% with docstring_sections = module.docstring.parsed %}
101
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
102
- {% include "docstring"|get_template with context %}
100
+ {% include "docstring.html.jinja" with context %}
103
101
  {% endwith %}
104
102
  {% endblock docstring %}
105
103
 
@@ -112,8 +110,7 @@ Context:
112
110
 
113
111
  This block renders auto-summaries for classes, methods, and attributes.
114
112
  -#}
115
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
116
- {% include "summary"|get_template with context %}
113
+ {% include "summary.html.jinja" with context %}
117
114
  {% endblock summary %}
118
115
 
119
116
  {% block children scoped %}
@@ -123,8 +120,7 @@ Context:
123
120
  -#}
124
121
  {% set root = False %}
125
122
  {% set heading_level = heading_level + 1 %}
126
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
127
- {% include "children"|get_template with context %}
123
+ {% include "children.html.jinja" with context %}
128
124
  {% endblock children %}
129
125
  {% endblock contents %}
130
126
  </div>
@@ -50,8 +50,7 @@ Context:
50
50
  {%- if config.separate_signature -%}
51
51
  {%- with expression = parameter.annotation -%}
52
52
  {%- set ns.annotation -%}: {% with backlink_type = "used-by" -%}
53
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
54
- {%- include "expression"|get_template with context -%}
53
+ {%- include "expression.html.jinja" with context -%}
55
54
  {%- endwith -%}{%- endset -%}
56
55
  {%- endwith -%}
57
56
  {%- else -%}
@@ -106,8 +105,7 @@ Context:
106
105
  {{ ns.equal }}
107
106
  {%- if config.signature_crossrefs and config.separate_signature -%}
108
107
  {%- with expression = parameter.default, backlink_type = "used-by" -%}
109
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
110
- {%- include "expression"|get_template with context -%}
108
+ {%- include "expression.html.jinja" with context -%}
111
109
  {%- endwith -%}
112
110
  {%- else -%}
113
111
  {{ parameter.default|safe }}
@@ -126,8 +124,7 @@ Context:
126
124
  and not (config.merge_init_into_class and function.name == "__init__" )
127
125
  %} -> {% if config.separate_signature and config.signature_crossrefs -%}
128
126
  {%- with expression = function.annotation, backlink_type = "returned-by" -%}
129
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
130
- {%- include "expression"|get_template with context -%}
127
+ {%- include "expression.html.jinja" with context -%}
131
128
  {%- endwith -%}
132
129
  {%- else -%}
133
130
  {{ function.annotation|safe }}
@@ -18,7 +18,6 @@
18
18
  |order_members(config.members_order, members_list)
19
19
  |as_attributes_section(check_public=not members_list)
20
20
  %}
21
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
22
- {% if section %}{% include "docstring/attributes"|get_template with context %}{% endif %}
21
+ {% if section %}{% include "docstring/attributes.html.jinja" with context %}{% endif %}
23
22
  {% endwith %}
24
23
  {% endif %}
@@ -18,7 +18,6 @@
18
18
  |order_members(config.members_order, members_list)
19
19
  |as_classes_section(check_public=not members_list)
20
20
  %}
21
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
22
- {% if section %}{% include "docstring/classes"|get_template with context %}{% endif %}
21
+ {% if section %}{% include "docstring/classes.html.jinja" with context %}{% endif %}
23
22
  {% endwith %}
24
23
  {% endif %}
@@ -18,7 +18,6 @@
18
18
  |order_members(config.members_order, members_list)
19
19
  |as_functions_section(check_public=not members_list)
20
20
  %}
21
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
22
- {% if section %}{% include "docstring/functions"|get_template with context %}{% endif %}
21
+ {% if section %}{% include "docstring/functions.html.jinja" with context %}{% endif %}
23
22
  {% endwith %}
24
23
  {% endif %}
@@ -18,7 +18,6 @@
18
18
  |order_members("alphabetical", members_list)
19
19
  |as_modules_section(check_public=not members_list)
20
20
  %}
21
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
22
- {% if section %}{% include "docstring/modules"|get_template with context %}{% endif %}
21
+ {% if section %}{% include "docstring/modules.html.jinja" with context %}{% endif %}
23
22
  {% endwith %}
24
23
  {% endif %}
@@ -18,7 +18,6 @@
18
18
  |order_members("alphabetical", members_list)
19
19
  |as_type_aliases_section(check_public=not members_list)
20
20
  %}
21
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
22
- {% if section %}{% include "docstring/type_aliases"|get_template with context %}{% endif %}
21
+ {% if section %}{% include "docstring/type_aliases.html.jinja" with context %}{% endif %}
23
22
  {% endwith %}
24
23
  {% endif %}
@@ -9,27 +9,22 @@
9
9
 
10
10
  {% with members_list = config.members if root_members else None %}
11
11
  {% if config.summary.modules %}
12
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
13
- {% include "summary/modules"|get_template with context %}
12
+ {% include "summary/modules.html.jinja" with context %}
14
13
  {% endif %}
15
14
 
16
15
  {% if config.summary.type_aliases %}
17
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
18
- {% include "summary/type_aliases"|get_template with context %}
16
+ {% include "summary/type_aliases.html.jinja" with context %}
19
17
  {% endif %}
20
18
 
21
19
  {% if config.summary.classes %}
22
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
23
- {% include "summary/classes"|get_template with context %}
20
+ {% include "summary/classes.html.jinja" with context %}
24
21
  {% endif %}
25
22
 
26
23
  {% if config.summary.functions %}
27
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
28
- {% include "summary/functions"|get_template with context %}
24
+ {% include "summary/functions.html.jinja" with context %}
29
25
  {% endif %}
30
26
 
31
27
  {% if config.summary.attributes %}
32
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
33
- {% include "summary/attributes"|get_template with context %}
28
+ {% include "summary/attributes.html.jinja" with context %}
34
29
  {% endif %}
35
30
  {% endwith %}
@@ -51,8 +51,7 @@ Context:
51
51
  <span class="doc doc-object-name doc-type_alias-name">{{ type_alias_name }}</span>
52
52
  {% else %}
53
53
  {%+ filter highlight(language="python", inline=True) %}
54
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
55
- {{ type_alias_name }}{% include "type_parameters"|get_template with context %} = {{ type_alias.value }}
54
+ {{ type_alias_name }}{% include "type_parameters.html.jinja" with context %} = {{ type_alias.value }}
56
55
  {% endfilter %}
57
56
  {% endif %}
58
57
  {% endblock heading %}
@@ -63,8 +62,7 @@ Context:
63
62
  This block renders the labels for the type alias.
64
63
  -#}
65
64
  {% with labels = type_alias.labels %}
66
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
67
- {% include "labels"|get_template with context %}
65
+ {% include "labels.html.jinja" with context %}
68
66
  {% endwith %}
69
67
  {% endblock labels %}
70
68
 
@@ -109,8 +107,7 @@ Context:
109
107
  This block renders the docstring for the type alias.
110
108
  -#}
111
109
  {% with docstring_sections = type_alias.docstring.parsed %}
112
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
113
- {% include "docstring"|get_template with context %}
110
+ {% include "docstring.html.jinja" with context %}
114
111
  {% endwith %}
115
112
  {% endblock docstring %}
116
113
  {% endblock contents %}
@@ -27,8 +27,7 @@ Context:
27
27
  {%- set ns.equal = " = " -%}
28
28
  {%- if config.separate_signature and config.signature_crossrefs -%}
29
29
  {%- with expression = type_parameter.annotation -%}
30
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
31
- {%- set ns.annotation -%}: {% include "expression"|get_template with context %}{%- endset -%}
30
+ {%- set ns.annotation -%}: {% include "expression.html.jinja" with context %}{%- endset -%}
32
31
  {%- endwith -%}
33
32
  {%- else -%}
34
33
  {%- set ns.annotation = ": " + type_parameter.annotation|safe -%}
@@ -72,8 +71,7 @@ Context:
72
71
  {{ ns.equal }}
73
72
  {%- if config.signature_crossrefs and config.separate_signature -%}
74
73
  {%- with expression = type_parameter.default -%}
75
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
76
- {%- include "expression"|get_template with context -%}
74
+ {%- include "expression.html.jinja" with context -%}
77
75
  {%- endwith -%}
78
76
  {%- else -%}
79
77
  {{ type_parameter.default|safe }}
@@ -210,3 +210,27 @@ code.doc-symbol-module::after {
210
210
  color: inherit;
211
211
  border-bottom: 1px dotted currentcolor;
212
212
  }
213
+
214
+ /* Source code blocks (admonitions). */
215
+ :root {
216
+ --md-admonition-icon--mkdocstrings-source: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.22 4.97a.75.75 0 0 1 1.06 0l6.5 6.5a.75.75 0 0 1 0 1.06l-6.5 6.5a.749.749 0 0 1-1.275-.326.75.75 0 0 1 .215-.734L21.19 12l-5.97-5.97a.75.75 0 0 1 0-1.06m-6.44 0a.75.75 0 0 1 0 1.06L2.81 12l5.97 5.97a.749.749 0 0 1-.326 1.275.75.75 0 0 1-.734-.215l-6.5-6.5a.75.75 0 0 1 0-1.06l6.5-6.5a.75.75 0 0 1 1.06 0"/></svg>')
217
+ }
218
+ .md-typeset .admonition.mkdocstrings-source,
219
+ .md-typeset details.mkdocstrings-source {
220
+ border: none;
221
+ padding: 0;
222
+ }
223
+ .md-typeset .admonition.mkdocstrings-source:focus-within,
224
+ .md-typeset details.mkdocstrings-source:focus-within {
225
+ box-shadow: none;
226
+ }
227
+ .md-typeset .mkdocstrings-source > .admonition-title,
228
+ .md-typeset .mkdocstrings-source > summary {
229
+ background-color: inherit;
230
+ }
231
+ .md-typeset .mkdocstrings-source > .admonition-title::before,
232
+ .md-typeset .mkdocstrings-source > summary::before {
233
+ background-color: var(--md-default-fg-color);
234
+ -webkit-mask-image: var(--md-admonition-icon--mkdocstrings-source);
235
+ mask-image: var(--md-admonition-icon--mkdocstrings-source);
236
+ }
@@ -0,0 +1,11 @@
1
+ {% extends "_base/class.html.jinja" %}
2
+
3
+ {% block logs scoped %}
4
+ {{ super() }}
5
+ {# TODO: Switch to a warning after some time. #}
6
+ {{ log.info(
7
+ "DeprecationWarning: Extending '_base/class.html' is deprecated, extend '_base/class.html.jinja' instead. " ~
8
+ "After some time, this message will be logged as a warning, causing strict builds to fail.",
9
+ once=True,
10
+ ) }}
11
+ {% endblock logs %}