mkdocstrings-python 2.0.9__py3-none-any.whl → 2.0.10__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.
@@ -3,21 +3,13 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import re
6
- import sys
7
6
  from dataclasses import field, fields
8
- from typing import TYPE_CHECKING, Annotated, Any, Literal
7
+ from typing import TYPE_CHECKING, Annotated, Any, Literal, Self
9
8
 
10
9
  from mkdocstrings import get_logger
11
10
 
12
11
  from mkdocstrings_handlers.python._internal.rendering import Order # noqa: TC001
13
12
 
14
- # YORE: EOL 3.10: Replace block with line 2.
15
- if sys.version_info >= (3, 11):
16
- from typing import Self
17
- else:
18
- from typing_extensions import Self
19
-
20
-
21
13
  _logger = get_logger(__name__)
22
14
 
23
15
  _DEFAULT_FILTERS = ["!^_[^_]"]
@@ -39,21 +39,7 @@ if TYPE_CHECKING:
39
39
  from mkdocs_autorefs import Backlink
40
40
 
41
41
 
42
- # YORE: EOL 3.10: Replace block with line 2.
43
- if sys.version_info >= (3, 11):
44
- from contextlib import chdir
45
- else:
46
- from contextlib import contextmanager
47
-
48
- @contextmanager
49
- def chdir(path: str) -> Iterator[None]:
50
- old_wd = os.getcwd()
51
- os.chdir(path)
52
- try:
53
- yield
54
- finally:
55
- os.chdir(old_wd)
56
-
42
+ from contextlib import chdir
57
43
 
58
44
  _logger = get_logger(__name__)
59
45
 
@@ -250,14 +250,14 @@ Context:
250
250
  {% with init = all_members["__init__"] %}
251
251
  <details class="mkdocstrings-source">
252
252
  <summary>{{ lang.t("Source code in") }} <code>{{ init|source_location }}</code></summary>
253
- {{ init.source|highlight(language="python", linestart=init.lineno or 0, linenums=True) }}
253
+ {{ init.source|highlight(language="python", linestart=init.lineno or 0, linenums=True, id_prefix=html_id ~ "--source--") }}
254
254
  </details>
255
255
  {% endwith %}
256
256
  {% endif %}
257
257
  {% elif class.source %}
258
258
  <details class="mkdocstrings-source">
259
259
  <summary>{{ lang.t("Source code in") }} <code>{{ class|source_location }}</code></summary>
260
- {{ class.source|highlight(language="python", linestart=class.lineno or 0, linenums=True) }}
260
+ {{ class.source|highlight(language="python", linestart=class.lineno or 0, linenums=True, id_prefix=html_id ~ "--source--") }}
261
261
  </details>
262
262
  {% endif %}
263
263
  {% endif %}
@@ -149,7 +149,7 @@ Context:
149
149
  {% if config.show_source and function.source %}
150
150
  <details class="mkdocstrings-source">
151
151
  <summary>{{ lang.t("Source code in") }} <code>{{ function|source_location }}</code></summary>
152
- {{ function.source|highlight(language="python", linestart=function.lineno or 0, linenums=True) }}
152
+ {{ function.source|highlight(language="python", linestart=function.lineno or 0, linenums=True, id_prefix=html_id ~ "--source--") }}
153
153
  </details>
154
154
  {% endif %}
155
155
  {% endblock source %}
@@ -209,14 +209,14 @@ Context:
209
209
  {% with init = class.all_members["__init__"] %}
210
210
  <details class="quote">
211
211
  <summary>Source code in <code>{{ init|source_location }}</code></summary>
212
- {{ init.source|highlight(language="python", linestart=init.lineno or 0, linenums=True) }}
212
+ {{ init.source|highlight(language="python", linestart=init.lineno or 0, linenums=True, id_prefix=html_id ~ "--source--") }}
213
213
  </details>
214
214
  {% endwith %}
215
215
  {% endif %}
216
216
  {% elif class.source %}
217
217
  <details class="quote">
218
218
  <summary>Source code in <code>{{ class|source_location }}</code></summary>
219
- {{ class.source|highlight(language="python", linestart=class.lineno or 0, linenums=True) }}
219
+ {{ class.source|highlight(language="python", linestart=class.lineno or 0, linenums=True, id_prefix=html_id ~ "--source--") }}
220
220
  </details>
221
221
  {% endif %}
222
222
  {% endif %}
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-python
3
- Version: 2.0.9
3
+ Version: 2.0.10
4
4
  Summary: A Python handler for mkdocstrings.
5
- Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
5
+ Author-Email: Timothée Mazzucotelli <dev@pawamoy.fr>
6
6
  License-Expression: ISC
7
7
  License-File: LICENSE
8
8
  Classifier: Development Status :: 4 - Beta
@@ -10,7 +10,6 @@ Classifier: Intended Audience :: Developers
10
10
  Classifier: Programming Language :: Python
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  Classifier: Programming Language :: Python :: 3.12
16
15
  Classifier: Programming Language :: Python :: 3.13
@@ -28,8 +27,8 @@ Project-URL: Issues, https://github.com/mkdocstrings/python/issues
28
27
  Project-URL: Discussions, https://github.com/mkdocstrings/python/discussions
29
28
  Project-URL: Gitter, https://gitter.im/mkdocstrings/python
30
29
  Project-URL: Funding, https://github.com/sponsors/pawamoy
31
- Requires-Python: >=3.10
32
- Requires-Dist: mkdocstrings>=0.30
30
+ Requires-Python: >=3.11
31
+ Requires-Dist: mkdocstrings>=1.0.8
33
32
  Requires-Dist: mkdocs-autorefs>=1.4
34
33
  Requires-Dist: griffelib>=2.0
35
34
  Requires-Dist: typing-extensions>=4.0; python_version < "3.11"
@@ -1,14 +1,14 @@
1
1
  mkdocstrings_handlers/python/__init__.py,sha256=nMq6EQFwlnoSHY5FZAS0Fpa-fnb_piBv0yGIW1x13EE,1700
2
2
  mkdocstrings_handlers/python/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- mkdocstrings_handlers/python/_internal/config.py,sha256=iSnsL-DXqWSm_0YKv-2giDxTdljxZWvDgTGkCo9GBPg,35261
3
+ mkdocstrings_handlers/python/_internal/config.py,sha256=4BC5wbcLOw0p3kIe8QAvB4TvgAi8BROrQC6HfLR_mIg,35104
4
4
  mkdocstrings_handlers/python/_internal/debug.py,sha256=A6B3w6LWN22kYtvvbmz7vnh8Pr5hzvtrHhM3-Es8Isg,2882
5
- mkdocstrings_handlers/python/_internal/handler.py,sha256=A80vSRt8LTooP8UIdlgnu0mv7AOJPBjXGUKhqy88OdI,17143
5
+ mkdocstrings_handlers/python/_internal/handler.py,sha256=MwoWM-X2CD9fnHB-_KNFiD2A4VSxfsn24pDXeWAD4_M,16819
6
6
  mkdocstrings_handlers/python/_internal/rendering.py,sha256=Rq3Wpj15KJX-0IvntAFtenVaAgIhyW9yUWiFLXmc5bM,30029
7
7
  mkdocstrings_handlers/python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja,sha256=jKDnwh9FtF9dwVO5iCIXj8NxpUcIhtbqX3EJeqYZXy8,4917
9
9
  mkdocstrings_handlers/python/templates/material/_base/backlinks.html.jinja,sha256=k8eX0lyQmmooaEotjYngdXO8RJldjixvZW30S5jGXOA,2109
10
10
  mkdocstrings_handlers/python/templates/material/_base/children.html.jinja,sha256=1q7RS0i6SkNriRtGX8BC2wzKhp3pPcLVSJWBEUmZOSg,8153
11
- mkdocstrings_handlers/python/templates/material/_base/class.html.jinja,sha256=UHLcx86ZNT-jVsqrtxiRcpZ97V7ReueT7ywPP7JiLZ4,11665
11
+ mkdocstrings_handlers/python/templates/material/_base/class.html.jinja,sha256=M7BplT80FzcgqNcz70LQGybApfoCplbo4BU3lneb1gg,11733
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
14
  mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja,sha256=WVy3pU1KGIhk1rFdADmWydj-KUXZW7STC_OWAl0yFyk,4349
@@ -26,7 +26,7 @@ mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.
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
28
  mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja,sha256=zjjO_q9oCQCpVx6iR0adfog_lhQ85uM4oHZDJO_sKqU,6592
29
- mkdocstrings_handlers/python/templates/material/_base/function.html.jinja,sha256=oEKyREZQnWm9d-f_28qdaOvWZWOaSCjV5OfKvOnYCas,6105
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
32
32
  mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja,sha256=tzS9C3l1c5liALvpYl7dHOGhtoFpRQwMgm_gAVKcv_Y,1731
@@ -86,7 +86,7 @@ mkdocstrings_handlers/python/templates/material/type_alias.html.jinja,sha256=wQw
86
86
  mkdocstrings_handlers/python/templates/material/type_parameters.html,sha256=-YLk-DbKYz8wQqar6-KAvzyQHlb7jDtykpWqqqRRa88,49
87
87
  mkdocstrings_handlers/python/templates/material/type_parameters.html.jinja,sha256=-YLk-DbKYz8wQqar6-KAvzyQHlb7jDtykpWqqqRRa88,49
88
88
  mkdocstrings_handlers/python/templates/readthedocs/_base/class.html,sha256=x0M8Wjk7TC9cgnstMoukLVQvxZUEMFjQA0VJQPEAC9Y,415
89
- mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja,sha256=XBJuYmH65zHBIL4SzylZ8jQKGgSzBXUfvdc3ySy2SHA,9135
89
+ mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja,sha256=y5hTAr37wWwew0giW-PfqccW1Pfd7PIl_boklt3hjRI,9203
90
90
  mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja,sha256=Bq7zsZqREC_VkZpbxS0gJlNG46FPyvaYZAJYAVUijPU,1535
91
91
  mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja,sha256=t6hWw_CvWQHfLO0EIggXImg4YBarC97HgXBGOLwdjc0,1580
92
92
  mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja,sha256=eQFg4aSUNpl8m7Cp_gQHbgsir2aV9nCDUroZWZ4seFQ,1873
@@ -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.9.dist-info/METADATA,sha256=IbDDrOkyvhr8fjNyc7E1bo5-_ruUIZJRgTLG_kZaI4s,12384
118
- mkdocstrings_python-2.0.9.dist-info/WHEEL,sha256=Y8xFLOH-FrS4gLE6ON4ti06sl2W_9QUDiRaTK3tfwig,91
119
- mkdocstrings_python-2.0.9.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
120
- mkdocstrings_python-2.0.9.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
121
- mkdocstrings_python-2.0.9.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.10)
2
+ Generator: pdm-backend (2.5.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any