mkdocstrings-python 1.19.0__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 (143) hide show
  1. mkdocstrings_handlers/python/__init__.py +0 -4
  2. mkdocstrings_handlers/python/_internal/handler.py +5 -44
  3. mkdocstrings_handlers/python/_internal/rendering.py +14 -111
  4. mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja +2 -4
  5. mkdocstrings_handlers/python/templates/material/_base/class.html.jinja +8 -16
  6. mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja +4 -8
  7. mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja +1 -2
  8. mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja +1 -2
  9. mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja +1 -2
  10. mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja +1 -2
  11. mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja +4 -8
  12. mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja +7 -14
  13. mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja +4 -8
  14. mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja +5 -10
  15. mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja +5 -10
  16. mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja +1 -1
  17. mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja +9 -9
  18. mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja +4 -8
  19. mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja +5 -10
  20. mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja +15 -30
  21. mkdocstrings_handlers/python/templates/material/_base/function.html.jinja +5 -9
  22. mkdocstrings_handlers/python/templates/material/_base/language.html.jinja +3 -6
  23. mkdocstrings_handlers/python/templates/material/_base/module.html.jinja +4 -8
  24. mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja +3 -6
  25. mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja +1 -2
  26. mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja +1 -2
  27. mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja +1 -2
  28. mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja +1 -2
  29. mkdocstrings_handlers/python/templates/material/_base/summary/type_aliases.html.jinja +1 -2
  30. mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja +5 -10
  31. mkdocstrings_handlers/python/templates/material/_base/type_alias.html.jinja +3 -6
  32. mkdocstrings_handlers/python/templates/material/_base/type_parameters.html.jinja +2 -4
  33. mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja +18 -18
  34. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja +2 -4
  35. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja +2 -4
  36. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja +3 -6
  37. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja +2 -4
  38. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja +2 -4
  39. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja +2 -4
  40. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja +2 -4
  41. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja +2 -4
  42. mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja +3 -6
  43. mkdocstrings_python-2.0.0.dist-info/METADATA +179 -0
  44. mkdocstrings_python-2.0.0.dist-info/RECORD +121 -0
  45. {mkdocstrings_python-1.19.0.dist-info → mkdocstrings_python-2.0.0.dist-info}/WHEEL +1 -1
  46. mkdocstrings_handlers/python/config.py +0 -17
  47. mkdocstrings_handlers/python/handler.py +0 -17
  48. mkdocstrings_handlers/python/rendering.py +0 -17
  49. mkdocstrings_handlers/python/templates/material/_base/attribute.html +0 -10
  50. mkdocstrings_handlers/python/templates/material/_base/children.html +0 -10
  51. mkdocstrings_handlers/python/templates/material/_base/class.html +0 -10
  52. mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html +0 -10
  53. mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +0 -10
  54. mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +0 -10
  55. mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +0 -10
  56. mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +0 -10
  57. mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +0 -10
  58. mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +0 -10
  59. mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +0 -10
  60. mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +0 -10
  61. mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +0 -10
  62. mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +0 -10
  63. mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html +0 -10
  64. mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html +0 -10
  65. mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +0 -10
  66. mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +0 -10
  67. mkdocstrings_handlers/python/templates/material/_base/docstring.html +0 -10
  68. mkdocstrings_handlers/python/templates/material/_base/expression.html +0 -10
  69. mkdocstrings_handlers/python/templates/material/_base/function.html +0 -10
  70. mkdocstrings_handlers/python/templates/material/_base/labels.html +0 -10
  71. mkdocstrings_handlers/python/templates/material/_base/language.html +0 -10
  72. mkdocstrings_handlers/python/templates/material/_base/languages/en.html +0 -10
  73. mkdocstrings_handlers/python/templates/material/_base/languages/ja.html +0 -10
  74. mkdocstrings_handlers/python/templates/material/_base/languages/zh.html +0 -10
  75. mkdocstrings_handlers/python/templates/material/_base/module.html +0 -10
  76. mkdocstrings_handlers/python/templates/material/_base/signature.html +0 -10
  77. mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html +0 -10
  78. mkdocstrings_handlers/python/templates/material/_base/summary/classes.html +0 -10
  79. mkdocstrings_handlers/python/templates/material/_base/summary/functions.html +0 -10
  80. mkdocstrings_handlers/python/templates/material/_base/summary/modules.html +0 -10
  81. mkdocstrings_handlers/python/templates/material/_base/summary/type_aliases.html +0 -10
  82. mkdocstrings_handlers/python/templates/material/_base/summary.html +0 -10
  83. mkdocstrings_handlers/python/templates/material/_base/type_alias.html +0 -10
  84. mkdocstrings_handlers/python/templates/material/_base/type_parameters.html +0 -10
  85. mkdocstrings_handlers/python/templates/material/attribute.html +0 -2
  86. mkdocstrings_handlers/python/templates/material/children.html +0 -2
  87. mkdocstrings_handlers/python/templates/material/class.html +0 -2
  88. mkdocstrings_handlers/python/templates/material/docstring/admonition.html +0 -2
  89. mkdocstrings_handlers/python/templates/material/docstring/attributes.html +0 -2
  90. mkdocstrings_handlers/python/templates/material/docstring/classes.html +0 -2
  91. mkdocstrings_handlers/python/templates/material/docstring/examples.html +0 -2
  92. mkdocstrings_handlers/python/templates/material/docstring/functions.html +0 -2
  93. mkdocstrings_handlers/python/templates/material/docstring/modules.html +0 -2
  94. mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html +0 -2
  95. mkdocstrings_handlers/python/templates/material/docstring/parameters.html +0 -2
  96. mkdocstrings_handlers/python/templates/material/docstring/raises.html +0 -2
  97. mkdocstrings_handlers/python/templates/material/docstring/receives.html +0 -2
  98. mkdocstrings_handlers/python/templates/material/docstring/returns.html +0 -2
  99. mkdocstrings_handlers/python/templates/material/docstring/warns.html +0 -2
  100. mkdocstrings_handlers/python/templates/material/docstring/yields.html +0 -2
  101. mkdocstrings_handlers/python/templates/material/docstring.html +0 -2
  102. mkdocstrings_handlers/python/templates/material/expression.html +0 -2
  103. mkdocstrings_handlers/python/templates/material/function.html +0 -2
  104. mkdocstrings_handlers/python/templates/material/labels.html +0 -2
  105. mkdocstrings_handlers/python/templates/material/language.html +0 -2
  106. mkdocstrings_handlers/python/templates/material/languages/en.html +0 -2
  107. mkdocstrings_handlers/python/templates/material/languages/ja.html +0 -2
  108. mkdocstrings_handlers/python/templates/material/languages/zh.html +0 -2
  109. mkdocstrings_handlers/python/templates/material/module.html +0 -2
  110. mkdocstrings_handlers/python/templates/material/signature.html +0 -2
  111. mkdocstrings_handlers/python/templates/material/summary/attributes.html +0 -2
  112. mkdocstrings_handlers/python/templates/material/summary/classes.html +0 -2
  113. mkdocstrings_handlers/python/templates/material/summary/functions.html +0 -2
  114. mkdocstrings_handlers/python/templates/material/summary/modules.html +0 -2
  115. mkdocstrings_handlers/python/templates/material/summary.html +0 -2
  116. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html +0 -10
  117. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html +0 -10
  118. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html +0 -10
  119. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html +0 -10
  120. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html +0 -10
  121. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html +0 -10
  122. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html +0 -10
  123. mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html +0 -10
  124. mkdocstrings_handlers/python/templates/readthedocs/_base/language.html +0 -10
  125. mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html +0 -10
  126. mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html +0 -10
  127. mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html +0 -10
  128. mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html +0 -2
  129. mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html +0 -2
  130. mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html +0 -2
  131. mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html +0 -2
  132. mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html +0 -2
  133. mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html +0 -2
  134. mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html +0 -2
  135. mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html +0 -2
  136. mkdocstrings_handlers/python/templates/readthedocs/language.html +0 -2
  137. mkdocstrings_handlers/python/templates/readthedocs/languages/en.html +0 -2
  138. mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html +0 -2
  139. mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html +0 -2
  140. mkdocstrings_python-1.19.0.dist-info/METADATA +0 -121
  141. mkdocstrings_python-1.19.0.dist-info/RECORD +0 -215
  142. {mkdocstrings_python-1.19.0.dist-info → mkdocstrings_python-2.0.0.dist-info}/entry_points.txt +0 -0
  143. {mkdocstrings_python-1.19.0.dist-info → mkdocstrings_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -11,7 +11,7 @@ Context:
11
11
 
12
12
  {% block logs scoped %}
13
13
  {#- Logging block.
14
-
14
+
15
15
  This block can be used to log debug messages, deprecation messages, warnings, etc.
16
16
  -#}
17
17
  {{ log.debug("Rendering " + class.path) }}
@@ -43,7 +43,7 @@ Context:
43
43
 
44
44
  {% block heading scoped %}
45
45
  {#- Heading block.
46
-
46
+
47
47
  This block renders the heading for the class.
48
48
  -#}
49
49
  {% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code>{% endif %}
@@ -52,7 +52,7 @@ Context:
52
52
  {% elif config.merge_init_into_class and "__init__" in class.all_members %}
53
53
  {% with function = class.all_members["__init__"] %}
54
54
  {%+ filter highlight(language="python", inline=True) %}
55
- {{ class_name }}{% include "signature"|get_template with context %}
55
+ {{ class_name }}{% include "signature.html.jinja" with context %}
56
56
  {% endfilter %}
57
57
  {% endwith %}
58
58
  {% else %}
@@ -62,11 +62,11 @@ Context:
62
62
 
63
63
  {% block labels scoped %}
64
64
  {#- Labels block.
65
-
65
+
66
66
  This block renders the labels for the class.
67
67
  -#}
68
68
  {% with labels = class.labels %}
69
- {% include "labels"|get_template with context %}
69
+ {% include "labels.html.jinja" with context %}
70
70
  {% endwith %}
71
71
  {% endblock labels %}
72
72
 
@@ -74,7 +74,7 @@ Context:
74
74
 
75
75
  {% block signature scoped %}
76
76
  {#- Signature block.
77
-
77
+
78
78
  This block renders the signature for the class.
79
79
  -#}
80
80
  {% if config.separate_signature and config.merge_init_into_class %}
@@ -104,20 +104,20 @@ Context:
104
104
  <div class="doc doc-contents {% if root %}first{% endif %}">
105
105
  {% block contents scoped %}
106
106
  {#- Contents block.
107
-
107
+
108
108
  This block renders the contents of the class.
109
109
  It contains other blocks that users can override.
110
110
  Overriding the contents block allows to rearrange the order of the blocks.
111
111
  -#}
112
112
  {% block bases scoped %}
113
113
  {#- Class bases block.
114
-
114
+
115
115
  This block renders the bases for the class.
116
116
  -#}
117
117
  {% if config.show_bases and class.bases %}
118
118
  <p class="doc doc-class-bases">
119
119
  Bases: {% for expression in class.bases -%}
120
- <code>{% include "expression"|get_template with context %}</code>{% if not loop.last %}, {% endif %}
120
+ <code>{% include "expression.html.jinja" with context %}</code>{% if not loop.last %}, {% endif %}
121
121
  {% endfor -%}
122
122
  </p>
123
123
  {% endif %}
@@ -125,7 +125,7 @@ Context:
125
125
 
126
126
  {% block inheritance_diagram scoped %}
127
127
  {#- Inheritance diagram block.
128
-
128
+
129
129
  This block renders the inheritance diagram for the class,
130
130
  using Mermaid syntax and a bit of JavaScript to make the nodes clickable,
131
131
  linking to the corresponding class documentation.
@@ -173,17 +173,17 @@ Context:
173
173
 
174
174
  {% block docstring scoped %}
175
175
  {#- Docstring block.
176
-
176
+
177
177
  This block renders the docstring for the class.
178
178
  -#}
179
179
  {% with docstring_sections = class.docstring.parsed %}
180
- {% include "docstring"|get_template with context %}
180
+ {% include "docstring.html.jinja" with context %}
181
181
  {% endwith %}
182
182
  {% if config.merge_init_into_class %}
183
183
  {% if "__init__" in class.all_members and class.all_members["__init__"].has_docstring %}
184
184
  {% with function = class.all_members["__init__"] %}
185
185
  {% with obj = function, docstring_sections = function.docstring.parsed %}
186
- {% include "docstring"|get_template with context %}
186
+ {% include "docstring.html.jinja" with context %}
187
187
  {% endwith %}
188
188
  {% endwith %}
189
189
  {% endif %}
@@ -192,15 +192,15 @@ Context:
192
192
 
193
193
  {% block summary scoped %}
194
194
  {#- Summary block.
195
-
195
+
196
196
  This block renders auto-summaries for classes, methods, and attributes.
197
197
  -#}
198
- {% include "summary"|get_template with context %}
198
+ {% include "summary.html.jinja" with context %}
199
199
  {% endblock summary %}
200
200
 
201
201
  {% block source scoped %}
202
202
  {#- Source block.
203
-
203
+
204
204
  This block renders the source code for the class.
205
205
  -#}
206
206
  {% if config.show_source %}
@@ -236,12 +236,12 @@ Context:
236
236
 
237
237
  {% block children scoped %}
238
238
  {#- Children block.
239
-
239
+
240
240
  This block renders the children (members) of the class.
241
241
  -#}
242
242
  {% set root = False %}
243
243
  {% set heading_level = heading_level + 1 %}
244
- {% include "children"|get_template with context %}
244
+ {% include "children.html.jinja" with context %}
245
245
  {% endblock children %}
246
246
  {% endblock contents %}
247
247
  </div>
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -34,8 +33,7 @@ Context:
34
33
  <b><code>{{ attribute.name }}</code></b>
35
34
  {% if attribute.annotation %}
36
35
  {% with expression = attribute.annotation %}
37
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
38
- (<code>{% include "expression"|get_template with context %}</code>)
36
+ (<code>{% include "expression.html.jinja" with context %}</code>)
39
37
  {% endwith %}
40
38
  {% endif %}
41
39
  –
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -34,8 +33,7 @@ Context:
34
33
  <b><code>{{ parameter.name }}</code></b>
35
34
  {% if parameter.annotation %}
36
35
  {% with expression = parameter.annotation, backlink_type = "used-by" %}
37
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
38
- (<code>{% include "expression"|get_template with context %}</code>)
36
+ (<code>{% include "expression.html.jinja" with context %}</code>)
39
37
  {% endwith %}
40
38
  {% endif %}
41
39
  –
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -34,12 +33,10 @@ Context:
34
33
  <b><code>{{ parameter.name }}</code></b>
35
34
  {% if parameter.annotation %}
36
35
  {% with expression = parameter.annotation, backlink_type = "used-by" %}
37
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
38
- (<code>{% include "expression"|get_template with context %}</code>
36
+ (<code>{% include "expression.html.jinja" with context %}</code>
39
37
  {%- if parameter.default %}, {{ lang.t("default:") }}
40
38
  {% with expression = parameter.default, backlink_type = "used-by" %}
41
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
42
- <code>{% include "expression"|get_template with context %}</code>
39
+ <code>{% include "expression.html.jinja" with context %}</code>
43
40
  {% endwith %}
44
41
  {% endif %})
45
42
  {% endwith %}
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -33,8 +32,7 @@ Context:
33
32
  <li>
34
33
  {% if raises.annotation %}
35
34
  {% with expression = raises.annotation, backlink_type = "raised-by" %}
36
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
37
- <code>{% include "expression"|get_template with context %}</code>
35
+ <code>{% include "expression.html.jinja" with context %}</code>
38
36
  {% endwith %}
39
37
  {% endif %}
40
38
  –
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -35,8 +34,7 @@ Context:
35
34
  {% if receives.annotation %}
36
35
  {% with expression = receives.annotation, backlink_type = "received-by" %}
37
36
  {% if receives.name %}({% endif %}
38
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
39
- <code>{% include "expression"|get_template with context %}</code>
37
+ <code>{% include "expression.html.jinja" with context %}</code>
40
38
  {% if receives.name %}){% endif %}
41
39
  {% endwith %}
42
40
  {% endif %}
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -35,8 +34,7 @@ Context:
35
34
  {% if returns.annotation %}
36
35
  {% with expression = returns.annotation, backlink_type = "returned-by" %}
37
36
  {% if returns.name %}({% endif %}
38
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
39
- <code>{% include "expression"|get_template with context %}</code>
37
+ <code>{% include "expression.html.jinja" with context %}</code>
40
38
  {% if returns.name %}){% endif %}
41
39
  {% endwith %}
42
40
  {% endif %}
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -33,8 +32,7 @@ Context:
33
32
  <li>
34
33
  {% if warns.annotation %}
35
34
  {% with expression = warns.annotation, backlink_type = "emitted-by" %}
36
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
37
- <code>{% include "expression"|get_template with context %}</code>
35
+ <code>{% include "expression.html.jinja" with context %}</code>
38
36
  {% endwith %}
39
37
  {% endif %}
40
38
  –
@@ -15,8 +15,7 @@ Context:
15
15
  {{ log.debug() }}
16
16
  {% endblock %}
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
  <table class="field-list">
@@ -35,8 +34,7 @@ Context:
35
34
  {% if yields.annotation %}
36
35
  {% with expression = yields.annotation, backlink_type = "yielded-by" %}
37
36
  {% if yields.name %}({% endif %}
38
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
39
- <code>{% include "expression"|get_template with context %}</code>
37
+ <code>{% include "expression.html.jinja" with context %}</code>
40
38
  {% if yields.name %}){% endif %}
41
39
  {% endwith %}
42
40
  {% endif %}
@@ -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 %}
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.4
2
+ Name: mkdocstrings-python
3
+ Version: 2.0.0
4
+ Summary: A Python handler for mkdocstrings.
5
+ Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
6
+ License-Expression: ISC
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Documentation
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Software Development :: Documentation
21
+ Classifier: Topic :: Utilities
22
+ Classifier: Typing :: Typed
23
+ Project-URL: Homepage, https://mkdocstrings.github.io/python
24
+ Project-URL: Documentation, https://mkdocstrings.github.io/python
25
+ Project-URL: Changelog, https://mkdocstrings.github.io/python/changelog
26
+ Project-URL: Repository, https://github.com/mkdocstrings/python
27
+ Project-URL: Issues, https://github.com/mkdocstrings/python/issues
28
+ Project-URL: Discussions, https://github.com/mkdocstrings/python/discussions
29
+ Project-URL: Gitter, https://gitter.im/mkdocstrings/python
30
+ Project-URL: Funding, https://github.com/sponsors/pawamoy
31
+ Requires-Python: >=3.10
32
+ Requires-Dist: mkdocstrings>=0.30
33
+ Requires-Dist: mkdocs-autorefs>=1.4
34
+ Requires-Dist: griffe>=1.13
35
+ Requires-Dist: typing-extensions>=4.0; python_version < "3.11"
36
+ Description-Content-Type: text/markdown
37
+
38
+ <h1 align="center">mkdocstrings-python</h1>
39
+
40
+ <p align="center">A Python handler for <a href="https://github.com/mkdocstrings/mkdocstrings"><i>mkdocstrings</i></a>.</p>
41
+
42
+ [![ci](https://github.com/mkdocstrings/python/workflows/ci/badge.svg)](https://github.com/mkdocstrings/python/actions?query=workflow%3Aci)
43
+ [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/python/)
44
+ [![pypi version](https://img.shields.io/pypi/v/mkdocstrings-python.svg)](https://pypi.org/project/mkdocstrings-python/)
45
+ [![gitter](https://img.shields.io/badge/matrix-chat-4DB798.svg?style=flat)](https://app.gitter.im/#/room/#mkdocstrings_python:gitter.im)
46
+
47
+ ---
48
+
49
+ <p align="center"><img src="logo.png"></p>
50
+
51
+ The Python handler uses [Griffe](https://mkdocstrings.github.io/griffe)
52
+ to collect documentation from Python source code.
53
+ The word "griffe" can sometimes be used instead of "signature" in French.
54
+ Griffe is able to visit the Abstract Syntax Tree (AST) of the source code to extract useful information.
55
+ It is also able to execute the code (by importing it) and introspect objects in memory
56
+ when source code is not available. Finally, it can parse docstrings following different styles.
57
+
58
+ ## Installation
59
+
60
+ You can install this handler as a *mkdocstrings* extra:
61
+
62
+ ```toml title="pyproject.toml"
63
+ # PEP 621 dependencies declaration
64
+ # adapt to your dependencies manager
65
+ [project]
66
+ dependencies = [
67
+ "mkdocstrings[python]>=0.18",
68
+ ]
69
+ ```
70
+
71
+ You can also explicitly depend on the handler:
72
+
73
+ ```toml title="pyproject.toml"
74
+ # PEP 621 dependencies declaration
75
+ # adapt to your dependencies manager
76
+ [project]
77
+ dependencies = [
78
+ "mkdocstrings-python",
79
+ ]
80
+ ```
81
+
82
+ ## Preview
83
+
84
+ <!-- TODO: update the GIF with a more recent screen capture. Maybe use mp4 instead -->
85
+ ![mkdocstrings_python_gif](https://user-images.githubusercontent.com/3999221/77157838-7184db80-6aa2-11ea-9f9a-fe77405202de.gif)
86
+
87
+ ## Features
88
+
89
+ - **Data collection from source code**: collection of the object-tree and the docstrings is done thanks to
90
+ [Griffe](https://github.com/mkdocstrings/griffe).
91
+
92
+ - **Support for type annotations:** Griffe collects your type annotations and *mkdocstrings* uses them
93
+ to display parameter types or return types. It is even able to automatically add cross-references
94
+ to other objects from your API, from the standard library or third-party libraries!
95
+ See [how to load inventories](https://mkdocstrings.github.io/usage/#cross-references-to-other-projects-inventories) to enable it.
96
+
97
+ - **Recursive documentation of Python objects:** just use the module dotted-path as an identifier, and you get the full
98
+ module docs. You don't need to inject documentation for each class, function, etc.
99
+
100
+ - **Support for documented attributes:** attributes (variables) followed by a docstring (triple-quoted string) will
101
+ be recognized by Griffe in modules, classes and even in `__init__` methods.
102
+
103
+ - **Multiple docstring-styles support:** common support for Google-style, Numpydoc-style,
104
+ and Sphinx-style docstrings. See [Griffe's documentation](https://mkdocstrings.github.io/griffe/docstrings/) on docstrings support.
105
+
106
+ - **Admonition support in Google docstrings:** blocks like `Note:` or `Warning:` will be transformed
107
+ to their [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) equivalent.
108
+ *We do not support nested admonitions in docstrings!*
109
+
110
+ - **Every object has a TOC entry:** we render a heading for each object, meaning *MkDocs* picks them into the Table
111
+ of Contents, which is nicely displayed by the Material theme. Thanks to *mkdocstrings* cross-reference ability,
112
+ you can reference other objects within your docstrings, with the classic Markdown syntax:
113
+ `[this object][package.module.object]` or directly with `[package.module.object][]`
114
+
115
+ - **Source code display:** *mkdocstrings* can add a collapsible div containing the highlighted source code
116
+ of the Python object.
117
+
118
+ ## Sponsors
119
+
120
+ <!-- sponsors-start -->
121
+
122
+ <div id="premium-sponsors" style="text-align: center;">
123
+
124
+ <div id="silver-sponsors"><b>Silver sponsors</b><p>
125
+ <a href="https://squidfunk.github.io/mkdocs-material/"><img alt="Material for MkDocs" src="https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/logo.svg" style="height: 320px; "></a><br>
126
+ <a href="https://fastapi.tiangolo.com/"><img alt="FastAPI" src="https://raw.githubusercontent.com/tiangolo/fastapi/master/docs/en/docs/img/logo-margin/logo-teal.png" style="height: 200px; "></a><br>
127
+ <a href="https://docs.pydantic.dev/latest/"><img alt="Pydantic" src="https://pydantic.dev/assets/for-external/pydantic_logfire_logo_endorsed_lithium_rgb.svg" style="height: 180px; "></a><br>
128
+ </p></div>
129
+
130
+ <div id="bronze-sponsors"><b>Bronze sponsors</b><p>
131
+ <a href="https://www.nixtla.io/"><picture><source media="(prefers-color-scheme: light)" srcset="https://www.nixtla.io/img/logo/full-black.svg"><source media="(prefers-color-scheme: dark)" srcset="https://www.nixtla.io/img/logo/full-white.svg"><img alt="Nixtla" src="https://www.nixtla.io/img/logo/full-black.svg" style="height: 60px; "></picture></a><br>
132
+ </p></div>
133
+ </div>
134
+
135
+ ---
136
+
137
+ <div id="sponsors"><p>
138
+ <a href="https://github.com/ofek"><img alt="ofek" src="https://avatars.githubusercontent.com/u/9677399?u=386c330f212ce467ce7119d9615c75d0e9b9f1ce&v=4" style="height: 32px; border-radius: 100%;"></a>
139
+ <a href="https://github.com/samuelcolvin"><img alt="samuelcolvin" src="https://avatars.githubusercontent.com/u/4039449?u=42eb3b833047c8c4b4f647a031eaef148c16d93f&v=4" style="height: 32px; border-radius: 100%;"></a>
140
+ <a href="https://github.com/tlambert03"><img alt="tlambert03" src="https://avatars.githubusercontent.com/u/1609449?u=922abf0524b47739b37095e553c99488814b05db&v=4" style="height: 32px; border-radius: 100%;"></a>
141
+ <a href="https://github.com/ssbarnea"><img alt="ssbarnea" src="https://avatars.githubusercontent.com/u/102495?u=c7bd9ddf127785286fc939dd18cb02db0a453bce&v=4" style="height: 32px; border-radius: 100%;"></a>
142
+ <a href="https://github.com/femtomc"><img alt="femtomc" src="https://avatars.githubusercontent.com/u/34410036?u=f13a71daf2a9f0d2da189beaa94250daa629e2d8&v=4" style="height: 32px; border-radius: 100%;"></a>
143
+ <a href="https://github.com/cmarqu"><img alt="cmarqu" src="https://avatars.githubusercontent.com/u/360986?v=4" style="height: 32px; border-radius: 100%;"></a>
144
+ <a href="https://github.com/kolenaIO"><img alt="kolenaIO" src="https://avatars.githubusercontent.com/u/77010818?v=4" style="height: 32px; border-radius: 100%;"></a>
145
+ <a href="https://github.com/ramnes"><img alt="ramnes" src="https://avatars.githubusercontent.com/u/835072?u=3fca03c3ba0051e2eb652b1def2188a94d1e1dc2&v=4" style="height: 32px; border-radius: 100%;"></a>
146
+ <a href="https://github.com/machow"><img alt="machow" src="https://avatars.githubusercontent.com/u/2574498?u=c41e3d2f758a05102d8075e38d67b9c17d4189d7&v=4" style="height: 32px; border-radius: 100%;"></a>
147
+ <a href="https://github.com/BenHammersley"><img alt="BenHammersley" src="https://avatars.githubusercontent.com/u/99436?u=4499a7b507541045222ee28ae122dbe3c8d08ab5&v=4" style="height: 32px; border-radius: 100%;"></a>
148
+ <a href="https://github.com/trevorWieland"><img alt="trevorWieland" src="https://avatars.githubusercontent.com/u/28811461?u=74cc0e3756c1d4e3d66b5c396e1d131ea8a10472&v=4" style="height: 32px; border-radius: 100%;"></a>
149
+ <a href="https://github.com/laenan8466"><img alt="laenan8466" src="https://avatars.githubusercontent.com/u/21331242?v=4" style="height: 32px; border-radius: 100%;"></a>
150
+ <a href="https://github.com/MarcoGorelli"><img alt="MarcoGorelli" src="https://avatars.githubusercontent.com/u/33491632?u=7de3a749cac76a60baca9777baf71d043a4f884d&v=4" style="height: 32px; border-radius: 100%;"></a>
151
+ <a href="https://github.com/analog-cbarber"><img alt="analog-cbarber" src="https://avatars.githubusercontent.com/u/7408243?u=642fc2bdcc9904089c62fe5aec4e03ace32da67d&v=4" style="height: 32px; border-radius: 100%;"></a>
152
+ <a href="https://github.com/OdinManiac"><img alt="OdinManiac" src="https://avatars.githubusercontent.com/u/22727172?u=36ab20970f7f52ae8e7eb67b7fcf491fee01ac22&v=4" style="height: 32px; border-radius: 100%;"></a>
153
+ <a href="https://github.com/rstudio-sponsorship"><img alt="rstudio-sponsorship" src="https://avatars.githubusercontent.com/u/58949051?u=0c471515dd18111be30dfb7669ed5e778970959b&v=4" style="height: 32px; border-radius: 100%;"></a>
154
+ <a href="https://github.com/schlich"><img alt="schlich" src="https://avatars.githubusercontent.com/u/21191435?u=6f1240adb68f21614d809ae52d66509f46b1e877&v=4" style="height: 32px; border-radius: 100%;"></a>
155
+ <a href="https://github.com/SuperCowPowers"><img alt="SuperCowPowers" src="https://avatars.githubusercontent.com/u/6900187?v=4" style="height: 32px; border-radius: 100%;"></a>
156
+ <a href="https://github.com/butterlyn"><img alt="butterlyn" src="https://avatars.githubusercontent.com/u/53323535?v=4" style="height: 32px; border-radius: 100%;"></a>
157
+ <a href="https://github.com/livingbio"><img alt="livingbio" src="https://avatars.githubusercontent.com/u/10329983?v=4" style="height: 32px; border-radius: 100%;"></a>
158
+ <a href="https://github.com/NemetschekAllplan"><img alt="NemetschekAllplan" src="https://avatars.githubusercontent.com/u/912034?v=4" style="height: 32px; border-radius: 100%;"></a>
159
+ <a href="https://github.com/EricJayHartman"><img alt="EricJayHartman" src="https://avatars.githubusercontent.com/u/9259499?u=7e58cc7ec0cd3e85b27aec33656aa0f6612706dd&v=4" style="height: 32px; border-radius: 100%;"></a>
160
+ <a href="https://github.com/15r10nk"><img alt="15r10nk" src="https://avatars.githubusercontent.com/u/44680962?u=f04826446ff165742efa81e314bd03bf1724d50e&v=4" style="height: 32px; border-radius: 100%;"></a>
161
+ <a href="https://github.com/cdwilson"><img alt="cdwilson" src="https://avatars.githubusercontent.com/u/14631?v=4" style="height: 32px; border-radius: 100%;"></a>
162
+ <a href="https://github.com/activeloopai"><img alt="activeloopai" src="https://avatars.githubusercontent.com/u/34816118?v=4" style="height: 32px; border-radius: 100%;"></a>
163
+ <a href="https://github.com/roboflow"><img alt="roboflow" src="https://avatars.githubusercontent.com/u/53104118?v=4" style="height: 32px; border-radius: 100%;"></a>
164
+ <a href="https://github.com/wrath-codes"><img alt="wrath-codes" src="https://avatars.githubusercontent.com/u/90050913?u=b26582409dfff8ce2b60016fd119be09309708da&v=4" style="height: 32px; border-radius: 100%;"></a>
165
+ <a href="https://github.com/leodevian"><img alt="leodevian" src="https://avatars.githubusercontent.com/u/167141781?v=4" style="height: 32px; border-radius: 100%;"></a>
166
+ <a href="https://github.com/cmclaughlin"><img alt="cmclaughlin" src="https://avatars.githubusercontent.com/u/1061109?u=ddf6eec0edd2d11c980f8c3aa96e3d044d4e0468&v=4" style="height: 32px; border-radius: 100%;"></a>
167
+ <a href="https://github.com/blaisep"><img alt="blaisep" src="https://avatars.githubusercontent.com/u/254456?u=97d584b7c0a6faf583aa59975df4f993f671d121&v=4" style="height: 32px; border-radius: 100%;"></a>
168
+ <a href="https://github.com/RapidataAI"><img alt="RapidataAI" src="https://avatars.githubusercontent.com/u/104209891?v=4" style="height: 32px; border-radius: 100%;"></a>
169
+ <a href="https://github.com/rodolphebarbanneau"><img alt="rodolphebarbanneau" src="https://avatars.githubusercontent.com/u/46493454?u=6c405452a40c231cdf0b68e97544e07ee956a733&v=4" style="height: 32px; border-radius: 100%;"></a>
170
+ <a href="https://github.com/theSymbolSyndicate"><img alt="theSymbolSyndicate" src="https://avatars.githubusercontent.com/u/111542255?v=4" style="height: 32px; border-radius: 100%;"></a>
171
+ <a href="https://github.com/blakeNaccarato"><img alt="blakeNaccarato" src="https://avatars.githubusercontent.com/u/20692450?u=bb919218be30cfa994514f4cf39bb2f7cf952df4&v=4" style="height: 32px; border-radius: 100%;"></a>
172
+ <a href="https://github.com/ChargeStorm"><img alt="ChargeStorm" src="https://avatars.githubusercontent.com/u/26000165?v=4" style="height: 32px; border-radius: 100%;"></a>
173
+ <a href="https://github.com/Alphadelta14"><img alt="Alphadelta14" src="https://avatars.githubusercontent.com/u/480845?v=4" style="height: 32px; border-radius: 100%;"></a>
174
+ </p></div>
175
+
176
+
177
+ *And 8 more private sponsor(s).*
178
+
179
+ <!-- sponsors-end -->