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.
@@ -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(pre_loaded_module, find_stubs_package=final_config["find_stubs_package"])
287
- loader.load(module_name, find_stubs_package=final_config["find_stubs_package"])
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)
@@ -105,4 +105,9 @@ code.doc-symbol-module {
105
105
 
106
106
  code.doc-symbol-module::after {
107
107
  content: "mod";
108
- }
108
+ }
109
+
110
+ .doc-signature .autorefs {
111
+ color: inherit;
112
+ border-bottom: 1px dotted currentcolor;
113
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mkdocstrings-python
3
- Version: 1.9.0
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: markdown<3.6,>=3.3
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=TYaJahZF-XhyxNkB0t6GSfeOghLKTi2Xlt-f8PFo4s8,22925
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=apE7JiwiHDqqjL3_eCZnqFUhiaCXzGvRpc6VUrvjb7w,16046
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=trUx7_WeMau85EcfiBLtHSnaD-wfiEYPqI0p7Mw0EY0,2540
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.0.dist-info/METADATA,sha256=Qne636Q6Bnm-Wf_znWm_Cvrux352uhYEd61lm3z-9oo,5524
82
- mkdocstrings_python-1.9.0.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
83
- mkdocstrings_python-1.9.0.dist-info/licenses/LICENSE,sha256=JGb4pdPEM8TTjjhr-uNCO7oXkiVrwG5Pz0JamcjNF_s,754
84
- mkdocstrings_python-1.9.0.dist-info/RECORD,,
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,,