mkdocstrings-python 2.0.10__py3-none-any.whl → 2.0.11__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.
@@ -124,7 +124,7 @@ Context:
124
124
  <code>{% include "expression.html.jinja" with context %}</code>
125
125
  {%- endwith -%}
126
126
  {%- endif -%}
127
- {%- if type_parameter.constraints or type_parameter.default -%}
127
+ {%- if type_parameter.bound or type_parameter.constraints or type_parameter.default -%}
128
128
  )
129
129
  {% endif -%}
130
130
  –
@@ -54,22 +54,27 @@ Context:
54
54
  {%- elif annotation_path == "full" -%}
55
55
  {%- set annotation = full -%}
56
56
  {%- endif -%}
57
- {%- for prefix, title, path, suffix in annotation|split_path(full) -%}
58
- {{ prefix }}
59
- {%- if not signature -%}
60
- {#- Always render cross-references outside of signatures. We don't need to stash them. -#}
61
- <autoref identifier="{{ path }}"{% if backlink_type %} backlink-type="{{ backlink_type }}" backlink-anchor="{{ html_id }}"{% endif %} optional{% if title != path %} hover{% endif %}>{{ title }}</autoref>
62
- {%- elif config.signature_crossrefs -%}
63
- {#- We're in a signature and cross-references are enabled, we must render one and stash it. -#}
64
- {%- filter stash_crossref(length=title|length) -%}
57
+ {%- if name.reference_path is none -%}
58
+ {#- Unresolved names can match unrelated headings, so render them as plain text. -#}
59
+ {{ annotation }}
60
+ {%- else -%}
61
+ {%- for prefix, title, path, suffix in annotation|split_path(name.reference_path) -%}
62
+ {{ prefix }}
63
+ {%- if not signature -%}
64
+ {#- Always render cross-references outside of signatures. We don't need to stash them. -#}
65
65
  <autoref identifier="{{ path }}"{% if backlink_type %} backlink-type="{{ backlink_type }}" backlink-anchor="{{ html_id }}"{% endif %} optional{% if title != path %} hover{% endif %}>{{ title }}</autoref>
66
- {%- endfilter -%}
67
- {%- else -%}
68
- {#- We're in a signature but cross-references are disabled, we just render the title. -#}
69
- {{ title }}
70
- {%- endif -%}
71
- {{ suffix }}
72
- {%- endfor -%}
66
+ {%- elif config.signature_crossrefs -%}
67
+ {#- We're in a signature and cross-references are enabled, we must render one and stash it. -#}
68
+ {%- filter stash_crossref(length=title|length) -%}
69
+ <autoref identifier="{{ path }}"{% if backlink_type %} backlink-type="{{ backlink_type }}" backlink-anchor="{{ html_id }}"{% endif %} optional{% if title != path %} hover{% endif %}>{{ title }}</autoref>
70
+ {%- endfilter -%}
71
+ {%- else -%}
72
+ {#- We're in a signature but cross-references are disabled, we just render the title. -#}
73
+ {{ title }}
74
+ {%- endif -%}
75
+ {{ suffix }}
76
+ {%- endfor -%}
77
+ {%- endif -%}
73
78
  {%- endwith -%}
74
79
  {%- endmacro -%}
75
80
 
@@ -82,11 +87,13 @@ Context:
82
87
  Returns:
83
88
  The autorefs cross-reference, or the type parameter name.
84
89
  -#}
85
- {%- if not signature -%}
86
- <autoref identifier="{{ name.canonical_path }}" optional{% if name.name not in obj.type_parameters %} hover{% endif %}>{{ name.name }}</autoref>
90
+ {%- if name.reference_path is none -%}
91
+ {{ name.name }}
92
+ {%- elif not signature -%}
93
+ <autoref identifier="{{ name.reference_path }}" optional{% if name.name not in obj.type_parameters %} hover{% endif %}>{{ name.name }}</autoref>
87
94
  {%- elif config.signature_crossrefs -%}
88
95
  {%- filter stash_crossref(length=name.name|length) -%}
89
- <autoref identifier="{{ name.canonical_path }}" optional{% if name.name not in obj.type_parameters %} hover{% endif %}>{{ name.name }}</autoref>
96
+ <autoref identifier="{{ name.reference_path }}" optional{% if name.name not in obj.type_parameters %} hover{% endif %}>{{ name.name }}</autoref>
90
97
  {%- endfilter -%}
91
98
  {%- else -%}
92
99
  {{ name.name }}
@@ -102,13 +109,13 @@ Context:
102
109
  Returns:
103
110
  The autorefs cross-reference, or the parameter name.
104
111
  -#}
105
- {%- if config.signature_crossrefs -%}
112
+ {%- if config.signature_crossrefs and expression.reference_path is not none -%}
106
113
  {%- if signature -%}
107
114
  {%- filter stash_crossref(length=expression.name|length) -%}
108
- <autoref identifier="{{ expression.canonical_path }}" optional hover>{{ expression.name }}</autoref>
115
+ <autoref identifier="{{ expression.reference_path }}" optional hover>{{ expression.name }}</autoref>
109
116
  {%- endfilter -%}
110
117
  {%- else -%}
111
- <autoref identifier="{{ expression.canonical_path }}" optional hover>{{ expression.name }}</autoref>
118
+ <autoref identifier="{{ expression.reference_path }}" optional hover>{{ expression.name }}</autoref>
112
119
  {%- endif -%}
113
120
  {%- else -%}
114
121
  {{ expression.name }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-python
3
- Version: 2.0.10
3
+ Version: 2.0.11
4
4
  Summary: A Python handler for mkdocstrings.
5
5
  Author-Email: Timothée Mazzucotelli <dev@pawamoy.fr>
6
6
  License-Expression: ISC
@@ -30,7 +30,7 @@ Project-URL: Funding, https://github.com/sponsors/pawamoy
30
30
  Requires-Python: >=3.11
31
31
  Requires-Dist: mkdocstrings>=1.0.8
32
32
  Requires-Dist: mkdocs-autorefs>=1.4
33
- Requires-Dist: griffelib>=2.0
33
+ Requires-Dist: griffelib>=2.4
34
34
  Requires-Dist: typing-extensions>=4.0; python_version < "3.11"
35
35
  Description-Content-Type: text/markdown
36
36
 
@@ -120,10 +120,6 @@ dependencies = [
120
120
 
121
121
  <div id="premium-sponsors" style="text-align: center;">
122
122
 
123
- <div id="silver-sponsors"><b>Silver sponsors</b><p>
124
- <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>
125
- </p></div>
126
-
127
123
  <div id="bronze-sponsors"><b>Bronze sponsors</b><p>
128
124
  <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>
129
125
  </p></div>
@@ -137,6 +133,7 @@ dependencies = [
137
133
  <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>
138
134
  <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>
139
135
  <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>
136
+ <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>
140
137
  <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>
141
138
  <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>
142
139
  <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>
@@ -155,7 +152,6 @@ dependencies = [
155
152
  <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>
156
153
  <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>
157
154
  <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>
158
- <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>
159
155
  <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>
160
156
  <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>
161
157
  <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>
@@ -22,10 +22,10 @@ mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinj
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
24
  mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja,sha256=SlNRZDplIBDaSKq0u1n0FaEeXyiWJWh89sJf7edblfI,3405
25
- mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja,sha256=M5b3lEdhaqK_iazfzqzK0UJT0kJnhOUAgxrHzDVPIOw,8608
25
+ mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja,sha256=DKWTerA2b_gPQsL72msRixSyDdDbpbYcDfP9qj7dobk,8632
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=zjjO_q9oCQCpVx6iR0adfog_lhQ85uM4oHZDJO_sKqU,6592
28
+ mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja,sha256=fXAtyhexerSSfslochOpTR0cOBUxzWV1IcQv1YmNIsk,6936
29
29
  mkdocstrings_handlers/python/templates/material/_base/function.html.jinja,sha256=zdZRQE7KkN-IMBj5ISScamlyAyWR2076nSDAJ6PK5i4,6139
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.10.dist-info/METADATA,sha256=mWPSGIHyZoecaL-UvjBSQCNI_VD_vefLJrIfK2ihrgk,12319
118
- mkdocstrings_python-2.0.10.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
119
- mkdocstrings_python-2.0.10.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
120
- mkdocstrings_python-2.0.10.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
121
- mkdocstrings_python-2.0.10.dist-info/RECORD,,
117
+ mkdocstrings_python-2.0.11.dist-info/METADATA,sha256=YnOtEtxiA7cgZIn1WeGY-abDxtRaC_5bcjanVCBKNyM,12038
118
+ mkdocstrings_python-2.0.11.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
119
+ mkdocstrings_python-2.0.11.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
120
+ mkdocstrings_python-2.0.11.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
121
+ mkdocstrings_python-2.0.11.dist-info/RECORD,,