mkdocstrings-python 1.9.0__py3-none-any.whl → 1.9.2__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.
- mkdocstrings_handlers/python/handler.py +10 -2
- mkdocstrings_handlers/python/rendering.py +9 -0
- mkdocstrings_handlers/python/templates/material/style.css +6 -1
- {mkdocstrings_python-1.9.0.dist-info → mkdocstrings_python-1.9.2.dist-info}/METADATA +2 -3
- {mkdocstrings_python-1.9.0.dist-info → mkdocstrings_python-1.9.2.dist-info}/RECORD +7 -7
- {mkdocstrings_python-1.9.0.dist-info → mkdocstrings_python-1.9.2.dist-info}/WHEEL +0 -0
- {mkdocstrings_python-1.9.0.dist-info → mkdocstrings_python-1.9.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -283,8 +283,16 @@ class PythonHandler(BaseHandler):
|
|
|
283
283
|
try:
|
|
284
284
|
for pre_loaded_module in final_config.get("preload_modules") or []:
|
|
285
285
|
if pre_loaded_module not in self._modules_collection:
|
|
286
|
-
loader.load(
|
|
287
|
-
|
|
286
|
+
loader.load(
|
|
287
|
+
pre_loaded_module,
|
|
288
|
+
try_relative_path=False,
|
|
289
|
+
find_stubs_package=final_config["find_stubs_package"],
|
|
290
|
+
)
|
|
291
|
+
loader.load(
|
|
292
|
+
module_name,
|
|
293
|
+
try_relative_path=False,
|
|
294
|
+
find_stubs_package=final_config["find_stubs_package"],
|
|
295
|
+
)
|
|
288
296
|
except ImportError as error:
|
|
289
297
|
raise CollectionError(str(error)) from error
|
|
290
298
|
unresolved, iterations = loader.resolve_aliases(
|
|
@@ -166,6 +166,15 @@ def do_format_signature(
|
|
|
166
166
|
),
|
|
167
167
|
)
|
|
168
168
|
|
|
169
|
+
# Since we highlight the signature without `def`,
|
|
170
|
+
# Pygments sees it as a function call and not a function definition.
|
|
171
|
+
# The result is that the function name is not parsed as such,
|
|
172
|
+
# but instead as a regular name: `n` CSS class instead of `nf`.
|
|
173
|
+
# To fix it, we replace the first occurrence of an `n` CSS class
|
|
174
|
+
# with an `nf` one, unless we found `nf` already.
|
|
175
|
+
if signature.find('class="nf"') == -1:
|
|
176
|
+
signature = signature.replace('class="n"', 'class="nf"', 1)
|
|
177
|
+
|
|
169
178
|
if stash:
|
|
170
179
|
for key, value in stash.items():
|
|
171
180
|
signature = re.sub(rf"\b{key}\b", value, signature)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mkdocstrings-python
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.2
|
|
4
4
|
Summary: A Python handler for mkdocstrings.
|
|
5
5
|
Author-Email: Timothée Mazzucotelli <dev@pawamoy.fr>
|
|
6
6
|
License: ISC
|
|
@@ -27,8 +27,7 @@ Project-URL: Discussions, https://github.com/mkdocstrings/python/discussions
|
|
|
27
27
|
Project-URL: Gitter, https://gitter.im/mkdocstrings/python
|
|
28
28
|
Project-URL: Funding, https://github.com/sponsors/pawamoy
|
|
29
29
|
Requires-Python: >=3.8
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: mkdocstrings>=0.20
|
|
30
|
+
Requires-Dist: mkdocstrings>=0.24.2
|
|
32
31
|
Requires-Dist: griffe>=0.37
|
|
33
32
|
Description-Content-Type: text/markdown
|
|
34
33
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
mkdocstrings_handlers/python/__init__.py,sha256=k-0NWvXysr5RqWjtGyCozookveBB-ADZHIhgxvI1px8,128
|
|
2
2
|
mkdocstrings_handlers/python/debug.py,sha256=AscoYoSXHANgE7ps5o9TzkzBT43YxNmtPxl2a4zC5oE,2764
|
|
3
|
-
mkdocstrings_handlers/python/handler.py,sha256=
|
|
3
|
+
mkdocstrings_handlers/python/handler.py,sha256=b2xze-co4z2GD813QeF_BSlrceVUQ2UVGztgmHvZFwM,23165
|
|
4
4
|
mkdocstrings_handlers/python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
mkdocstrings_handlers/python/rendering.py,sha256=
|
|
5
|
+
mkdocstrings_handlers/python/rendering.py,sha256=NzZg3wtasUsFseDWvJaqN18K-SZmE5DF-wGfS5lvm8M,16542
|
|
6
6
|
mkdocstrings_handlers/python/templates/material/_base/attribute.html,sha256=LoaiKpVbjqSCeYD-LtDdnsI52OQ5NVb2VXXfTVvTwJE,2944
|
|
7
7
|
mkdocstrings_handlers/python/templates/material/_base/children.html,sha256=8z5dQ2HOywV7CQ3KYYgdBX8N-CGbnYZ8Sm7ugN89IIo,5709
|
|
8
8
|
mkdocstrings_handlers/python/templates/material/_base/class.html,sha256=z6u1gcbt8AFpY3XeVDqm1RTxw4koasKkSnl8UvSdCmM,5413
|
|
@@ -59,7 +59,7 @@ mkdocstrings_handlers/python/templates/material/languages/ja.html,sha256=vUYyvH4
|
|
|
59
59
|
mkdocstrings_handlers/python/templates/material/languages/zh.html,sha256=1yUDcpU5z482DyvRAA4Y_9yIpJ5ctp0_arp_xEnt3s0,39
|
|
60
60
|
mkdocstrings_handlers/python/templates/material/module.html,sha256=GKdbkIxQoObcjxZP6PRLpLOYXMVFS4gSN-nxolEeDjw,34
|
|
61
61
|
mkdocstrings_handlers/python/templates/material/signature.html,sha256=u9zdNsM5Lqh0ROOcThzsjHeHPJCMixy3XfzjypwyGLM,37
|
|
62
|
-
mkdocstrings_handlers/python/templates/material/style.css,sha256=
|
|
62
|
+
mkdocstrings_handlers/python/templates/material/style.css,sha256=L7_Gw62vXQRsXw8uPd-pqTHS5-TwiC6n2nZNbdEH9lY,2631
|
|
63
63
|
mkdocstrings_handlers/python/templates/material/summary.html,sha256=gg6FxupZVtsy0wkRJ7BStaM-JyCFs9nGMEDm0Gakxm4,35
|
|
64
64
|
mkdocstrings_handlers/python/templates/material/summary/attributes.html,sha256=BxjqllPQbMpKO2x-q6cJG1YUq6Rf2aBnNEjfxAo6IKQ,46
|
|
65
65
|
mkdocstrings_handlers/python/templates/material/summary/classes.html,sha256=J8cdjljZqCdgR92lW4LvV79xBLOmFa_xMoD54XSZKC4,43
|
|
@@ -78,7 +78,7 @@ mkdocstrings_handlers/python/templates/readthedocs/languages/en.html,sha256=u0j9
|
|
|
78
78
|
mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html,sha256=Az63fFTq4MIr65DjufCh8GYujB0-CiAJFDVVW9mCGtQ,984
|
|
79
79
|
mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html,sha256=oPB3-fnOdmdGdrnRZUgXw6zuQGlF-aq5Bbkm1zF4xgA,902
|
|
80
80
|
mkdocstrings_handlers/python/templates/readthedocs/style.css,sha256=Ds8vF1rSxc2B0c4P10osx4cqXHWMntcSCxmRfX-nfzw,971
|
|
81
|
-
mkdocstrings_python-1.9.
|
|
82
|
-
mkdocstrings_python-1.9.
|
|
83
|
-
mkdocstrings_python-1.9.
|
|
84
|
-
mkdocstrings_python-1.9.
|
|
81
|
+
mkdocstrings_python-1.9.2.dist-info/METADATA,sha256=QVZu906Mt1pMU_0IHls-7RDxJ5wKfcsebbl1TaowbPI,5492
|
|
82
|
+
mkdocstrings_python-1.9.2.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
|
|
83
|
+
mkdocstrings_python-1.9.2.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
|
|
84
|
+
mkdocstrings_python-1.9.2.dist-info/RECORD,,
|
|
File without changes
|
{mkdocstrings_python-1.9.0.dist-info → mkdocstrings_python-1.9.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|