mkdocstrings-python 2.0.3__py3-none-any.whl → 2.0.5__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.
@@ -245,7 +245,13 @@ def do_format_attribute(
245
245
  )
246
246
  signature += f": {annotation}"
247
247
  if show_value and attribute.value:
248
- value = template.render(context.parent, expression=attribute.value, signature=True, backlink_type="used-by")
248
+ value = template.render(
249
+ context.parent,
250
+ expression=attribute.value,
251
+ signature=True,
252
+ annotations_path="source",
253
+ backlink_type="used-by",
254
+ )
249
255
  signature += f" = {value}"
250
256
 
251
257
  signature = do_format_code(signature, line_length)
@@ -108,7 +108,7 @@ Context:
108
108
  ) %}
109
109
  {% if functions %}
110
110
  {% if config.show_category_heading %}
111
- {% filter heading(heading_level, id=html_id ~ "-functions", skip_inventory=config.skip_local_inventory) %}{{ lang.t("Functions") }}{% endfilter %}
111
+ {% filter heading(heading_level, id=html_id ~ "-functions", skip_inventory=config.skip_local_inventory) %}{{ lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}{% endfilter %}
112
112
  {% endif %}
113
113
  {% with heading_level = heading_level + extra_level %}
114
114
  {% for function in functions|order_members(config.members_order, members_list) %}
@@ -43,7 +43,7 @@ Context:
43
43
  </td>
44
44
  <td>
45
45
  <div class="doc-md-description">
46
- {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
46
+ {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
47
47
  </div>
48
48
  </td>
49
49
  </tr>
@@ -66,7 +66,7 @@ Context:
66
66
  {% endif %}
67
67
 
68
68
  <div class="doc-md-description">
69
- {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
69
+ {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
70
70
  </div>
71
71
  </li>
72
72
  {% endfor %}
@@ -88,7 +88,7 @@ Context:
88
88
  <td><code><autoref identifier="{{ obj.path }}.{{ attribute.name }}" optional hover>{{ attribute.name }}</autoref></code></td>
89
89
  <td class="doc-attribute-details">
90
90
  <div class="doc-md-description">
91
- {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
91
+ {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
92
92
  </div>
93
93
  <p>
94
94
  {% if attribute.annotation %}
@@ -106,4 +106,4 @@ Context:
106
106
  </tbody>
107
107
  </table>
108
108
  {% endblock spacy_style %}
109
- {% endif %}
109
+ {% endif %}
@@ -35,7 +35,7 @@ Context:
35
35
  <td><code><autoref identifier="{{ obj.path }}.{{ class.name }}" optional hover>{{ class.name }}</autoref></code></td>
36
36
  <td>
37
37
  <div class="doc-md-description">
38
- {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
38
+ {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[class.name], config))) }}
39
39
  </div>
40
40
  </td>
41
41
  </tr>
@@ -53,7 +53,7 @@ Context:
53
53
  <b><code><autoref identifier="{{ obj.path }}.{{ class.name }}" optional hover>{{ class.name }}</autoref></code></b>
54
54
 
55
55
  <div class="doc-md-description">
56
- {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
56
+ {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[class.name], config))) }}
57
57
  </div>
58
58
  </li>
59
59
  {% endfor %}
@@ -75,7 +75,7 @@ Context:
75
75
  <td><code><autoref identifier="{{ obj.path }}.{{ class.name }}" optional hover>{{ class.name }}</autoref></code></td>
76
76
  <td class="doc-class-details">
77
77
  <div class="doc-md-description">
78
- {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
78
+ {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[class.name], config))) }}
79
79
  </div>
80
80
  </td>
81
81
  </tr>
@@ -83,4 +83,4 @@ Context:
83
83
  </tbody>
84
84
  </table>
85
85
  {% endblock spacy_style %}
86
- {% endif %}
86
+ {% endif %}
@@ -36,7 +36,7 @@ Context:
36
36
  <td><code><autoref identifier="{{ obj.path }}.{{ function.name }}" optional hover>{{ function.name }}</autoref></code></td>
37
37
  <td>
38
38
  <div class="doc-md-description">
39
- {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
39
+ {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[function.name], config))) }}
40
40
  </div>
41
41
  </td>
42
42
  </tr>
@@ -56,7 +56,7 @@ Context:
56
56
  <b><code><autoref identifier="{{ obj.path }}.{{ function.name }}" optional hover>{{ function.name }}</autoref></code></b>
57
57
 
58
58
  <div class="doc-md-description">
59
- {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
59
+ {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[function.name], config))) }}
60
60
  </div>
61
61
  </li>
62
62
  {% endif %}
@@ -80,7 +80,7 @@ Context:
80
80
  <td><code><autoref identifier="{{ obj.path }}.{{ function.name }}" optional hover>{{ function.name }}</autoref></code></td>
81
81
  <td class="doc-function-details">
82
82
  <div class="doc-md-description">
83
- {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
83
+ {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[function.name], config))) }}
84
84
  </div>
85
85
  </td>
86
86
  </tr>
@@ -89,4 +89,4 @@ Context:
89
89
  </tbody>
90
90
  </table>
91
91
  {% endblock spacy_style %}
92
- {% endif %}
92
+ {% endif %}
@@ -35,7 +35,7 @@ Context:
35
35
  <td><code><autoref identifier="{{ obj.path }}.{{ module.name }}" optional hover>{{ module.name }}</autoref></code></td>
36
36
  <td>
37
37
  <div class="doc-md-description">
38
- {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
38
+ {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[module.name], config))) }}
39
39
  </div>
40
40
  </td>
41
41
  </tr>
@@ -53,7 +53,7 @@ Context:
53
53
  <b><code><autoref identifier="{{ obj.path }}.{{ module.name }}" optional hover>{{ module.name }}</autoref></code></b>
54
54
 
55
55
  <div class="doc-md-description">
56
- {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
56
+ {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[module.name], config))) }}
57
57
  </div>
58
58
  </li>
59
59
  {% endfor %}
@@ -75,7 +75,7 @@ Context:
75
75
  <td><code><autoref identifier="{{ obj.path }}.{{ module.name }}" optional hover>{{ module.name }}</autoref></code></td>
76
76
  <td class="doc-module-details">
77
77
  <div class="doc-md-description">
78
- {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
78
+ {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[module.name], config))) }}
79
79
  </div>
80
80
  </td>
81
81
  </tr>
@@ -83,4 +83,4 @@ Context:
83
83
  </tbody>
84
84
  </table>
85
85
  {% endblock spacy_style %}
86
- {% endif %}
86
+ {% endif %}
@@ -35,7 +35,7 @@ Context:
35
35
  <td><code><autoref identifier="{{ obj.path }}.{{ type_alias.name }}" optional hover>{{ type_alias.name }}</autoref></code></td>
36
36
  <td>
37
37
  <div class="doc-md-description">
38
- {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
38
+ {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[type_alias.name], config))) }}
39
39
  </div>
40
40
  </td>
41
41
  </tr>
@@ -53,7 +53,7 @@ Context:
53
53
  <b><code><autoref identifier="{{ obj.path }}.{{ type_alias.name }}" optional hover>{{ type_alias.name }}</autoref></code></b>
54
54
 
55
55
  <div class="doc-md-description">
56
- {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
56
+ {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[type_alias.name], config))) }}
57
57
  </div>
58
58
  </li>
59
59
  {% endfor %}
@@ -75,7 +75,7 @@ Context:
75
75
  <td><code><autoref identifier="{{ obj.path }}.{{ type_alias.name }}" optional hover>{{ type_alias.name }}</autoref></code></td>
76
76
  <td class="doc-type_alias-details">
77
77
  <div class="doc-md-description">
78
- {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
78
+ {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[type_alias.name], config))) }}
79
79
  </div>
80
80
  </td>
81
81
  </tr>
@@ -169,4 +169,4 @@ Context:
169
169
  {%- if config.modernize_annotations and expression is not string -%}
170
170
  {%- set expression = expression.modernize() -%}
171
171
  {%- endif -%}
172
- {{ render(expression, config.annotations_path, backlink_type|default("")) }}
172
+ {{ render(expression, annotations_path|default(config.annotations_path), backlink_type|default("")) }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-python
3
- Version: 2.0.3
3
+ Version: 2.0.5
4
4
  Summary: A Python handler for mkdocstrings.
5
5
  Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
6
6
  License-Expression: ISC
@@ -3,29 +3,29 @@ mkdocstrings_handlers/python/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JC
3
3
  mkdocstrings_handlers/python/_internal/config.py,sha256=iSnsL-DXqWSm_0YKv-2giDxTdljxZWvDgTGkCo9GBPg,35261
4
4
  mkdocstrings_handlers/python/_internal/debug.py,sha256=A6B3w6LWN22kYtvvbmz7vnh8Pr5hzvtrHhM3-Es8Isg,2882
5
5
  mkdocstrings_handlers/python/_internal/handler.py,sha256=8LET9phgBvHe-cpfo1OxqkAIFVK5dZzsYjTCWP3Ls6k,15641
6
- mkdocstrings_handlers/python/_internal/rendering.py,sha256=ETPIGQ47egjUVNyiBIx8kW72UQ-_ZOYcj3bAfrKMfmc,28437
6
+ mkdocstrings_handlers/python/_internal/rendering.py,sha256=0IPOsGkTRice-jEx5frfNYf_0n5lpL5cqXSsBDQAy8s,28535
7
7
  mkdocstrings_handlers/python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja,sha256=ajtKaGxs9-VJzPNiXbQTYTO6ADq8Ck9M9x2BfXakG0g,4838
9
9
  mkdocstrings_handlers/python/templates/material/_base/backlinks.html.jinja,sha256=k8eX0lyQmmooaEotjYngdXO8RJldjixvZW30S5jGXOA,2109
10
- mkdocstrings_handlers/python/templates/material/_base/children.html.jinja,sha256=nzWeNjIgVSZgBD3IDaaoxRtxUA1zkSYGQMfDjGahl4g,8112
10
+ mkdocstrings_handlers/python/templates/material/_base/children.html.jinja,sha256=1q7RS0i6SkNriRtGX8BC2wzKhp3pPcLVSJWBEUmZOSg,8153
11
11
  mkdocstrings_handlers/python/templates/material/_base/class.html.jinja,sha256=Wo_g0ag5P7d3rolVRYxtJMIT2U1KC9h7rh8yQFcuprQ,12153
12
12
  mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja,sha256=iKi-31JKoHwG7-w3S88A9YTu9kuV6-c9gwKb8bUtXuw,3440
13
13
  mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja,sha256=VFwImgb1toxkjWqyhTNFQbyYE3d11yXI___3vpIu2u0,687
14
- mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja,sha256=r5xPFwDwyzkGF8aNi66kRD3BRqcr_msDgZyrOOc6rSQ,4195
15
- mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja,sha256=WQW2f6iNgMObPF7X44hXIw_5vTfQeKFhdmlsVX6iUVY,3152
14
+ mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja,sha256=WVy3pU1KGIhk1rFdADmWydj-KUXZW7STC_OWAl0yFyk,4349
15
+ mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja,sha256=ChyfLTePcGq8_NYXNuBCSufZAzR3yqxu4pXuHySTmxI,3294
16
16
  mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja,sha256=CxkEQ5bThOv0jq-zpkz7ZPMuHohd-6DEpor_Ojr7t-4,967
17
- mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja,sha256=UrdJTx_mcfkp7z3rGVh_5vFHwNTh4oFh_wPpB8pR0qs,3691
18
- mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja,sha256=9TYqJndID8KtN-IonksYoFec1a6AvpMyPlsqxwFG5D8,3166
17
+ mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja,sha256=AmPFt0by3CWHL4jBIFNJrVepl1aa467XBVjqqcOUMhM,3842
18
+ mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja,sha256=_7s-TBJtv8i8qMkOREilNQ1E1VWab9XW-Y7Zo05OJYk,3311
19
19
  mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja,sha256=tnzLsC0GpcnVryFDEao2go1U61DbxWAM-ZVKwC6QxTY,4049
20
20
  mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja,sha256=kKZTWI7DfUWdCEnnzenDc6Rya2WHkPeStMdODjLImpE,7188
21
21
  mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja,sha256=uLQdEAcaiItD91eEm9cikdJ319Yt09otEKOr2WdGJx4,3637
22
22
  mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja,sha256=uhyvkQxAR5JbSgnoh_oglNPm2nb-DsAXi37C7ijUVaU,4765
23
23
  mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja,sha256=a5wE6A89wt_zBk72yev4Qa_FUQiQ8JMLey4TEZYOJz4,4729
24
- mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja,sha256=rBu5rkMnMLXcv5z4sGMfWRDN80JBvyDDkVfHAOHfvCU,3249
24
+ mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja,sha256=SlNRZDplIBDaSKq0u1n0FaEeXyiWJWh89sJf7edblfI,3405
25
25
  mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja,sha256=P_M8tvUKMS0DPpkS4GiT2FZq_bujQNIJA1tAjw8VWM0,8596
26
26
  mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja,sha256=evSdVXZwKpHIJ7dnCP3njB0DD7rcJPgTPgeG54jRIUE,3612
27
27
  mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja,sha256=bo1Fjfw21VZRdf8MPzReIr8sCFPDoBBWQloXJ42IObQ,4699
28
- mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja,sha256=Dwq9R60AQUMf5wcaFQ0KBzRqHwl95s_xRZPjyp9gvTo,6566
28
+ mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja,sha256=zjjO_q9oCQCpVx6iR0adfog_lhQ85uM4oHZDJO_sKqU,6592
29
29
  mkdocstrings_handlers/python/templates/material/_base/function.html.jinja,sha256=AljcQjr1e6laOEpp4LRPKjnQNkN99zcPISxbXeEqPf4,6239
30
30
  mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja,sha256=mue5CMl2WQpagj3aYqbUiAQX0P72aLCgY3MX_zEpE8s,786
31
31
  mkdocstrings_handlers/python/templates/material/_base/language.html.jinja,sha256=7gyknTiapqCM8TjUHdXkQgZMmYwcuy6Ze0pkntE7g8s,617
@@ -114,8 +114,8 @@ mkdocstrings_handlers/python/templates/readthedocs/languages/en.html.jinja,sha25
114
114
  mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html.jinja,sha256=e_DPZvMvaaJm0QyjTxW8SkBEbhMXBgBiMrLJ1osAwZc,46
115
115
  mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html.jinja,sha256=OuvrkorxuL0gKZNYneann1bwd1Z2i5bBY7SbC496HDw,46
116
116
  mkdocstrings_handlers/python/templates/readthedocs/style.css,sha256=Ds8vF1rSxc2B0c4P10osx4cqXHWMntcSCxmRfX-nfzw,971
117
- mkdocstrings_python-2.0.3.dist-info/METADATA,sha256=z-GPvx23CDkKJSNNJRjaLzaeuxhhRrw4Bm8j4-cFgfE,12759
118
- mkdocstrings_python-2.0.3.dist-info/WHEEL,sha256=Wb0ASbVj8JvWHpOiIpPi7ucfIgJeCi__PzivviEAQFc,90
119
- mkdocstrings_python-2.0.3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
120
- mkdocstrings_python-2.0.3.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
121
- mkdocstrings_python-2.0.3.dist-info/RECORD,,
117
+ mkdocstrings_python-2.0.5.dist-info/METADATA,sha256=eKZN7KMANgICCuu-Hy66bF-r-Tbi5HaM5c9gwE58Fvs,12759
118
+ mkdocstrings_python-2.0.5.dist-info/WHEEL,sha256=VP-D4TPS230sME9Z3vb3INXvo1yt0924YRm5AOsk_dE,90
119
+ mkdocstrings_python-2.0.5.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
120
+ mkdocstrings_python-2.0.5.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
121
+ mkdocstrings_python-2.0.5.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.7)
2
+ Generator: pdm-backend (2.4.9)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any