mkdocstrings-python-xref 1.14.0__tar.gz → 1.16__tar.gz
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_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/PKG-INFO +2 -2
- mkdocstrings_python_xref-1.16/mkdocstrings_handlers/python_xref/VERSION +2 -0
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/mkdocstrings_handlers/python_xref/crossref.py +2 -2
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/mkdocstrings_handlers/python_xref/handler.py +4 -31
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/pyproject.toml +1 -1
- mkdocstrings_python_xref-1.14.0/mkdocstrings_handlers/python_xref/VERSION +0 -1
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/.gitignore +0 -0
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/LICENSE.md +0 -0
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/README.md +0 -0
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/mkdocstrings_handlers/python_xref/__init__.py +0 -0
- {mkdocstrings_python_xref-1.14.0 → mkdocstrings_python_xref-1.16}/mkdocstrings_handlers/python_xref/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocstrings-python-xref
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.16
|
|
4
4
|
Summary: Enhanced mkdocstrings python handler
|
|
5
5
|
Project-URL: Repository, https://github.com/analog-garage/mkdocstrings-python-xref
|
|
6
6
|
Project-URL: Documentation, https://analog-garage.github.io/mkdocstrings-python-xref/
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
17
17
|
Classifier: Topic :: Software Development :: Documentation
|
|
18
18
|
Requires-Python: >=3.9
|
|
19
19
|
Requires-Dist: griffe>=1.0
|
|
20
|
-
Requires-Dist: mkdocstrings-python<2.0,>=1.
|
|
20
|
+
Requires-Dist: mkdocstrings-python<2.0,>=1.16.6
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
|
|
23
23
|
# mkdocstrings-python-xref
|
|
@@ -19,7 +19,7 @@ import re
|
|
|
19
19
|
from typing import Callable, List, Optional, cast
|
|
20
20
|
|
|
21
21
|
from griffe import Docstring, Object
|
|
22
|
-
from mkdocstrings
|
|
22
|
+
from mkdocstrings import get_logger
|
|
23
23
|
|
|
24
24
|
__all__ = [
|
|
25
25
|
"substitute_relative_crossrefs"
|
|
@@ -322,7 +322,7 @@ def substitute_relative_crossrefs(obj: Object, checkref: Optional[Callable[[str]
|
|
|
322
322
|
"""Recursively expand relative cross-references in all docstrings in tree.
|
|
323
323
|
|
|
324
324
|
Arguments:
|
|
325
|
-
obj: a Griffe [Object][griffe.
|
|
325
|
+
obj: a Griffe [Object][griffe.] whose docstrings should be modified
|
|
326
326
|
checkref: optional function to check whether computed cross-reference is valid.
|
|
327
327
|
Should return True if valid, False if not valid.
|
|
328
328
|
"""
|
|
@@ -20,15 +20,12 @@ from __future__ import annotations
|
|
|
20
20
|
import sys
|
|
21
21
|
from dataclasses import dataclass, fields
|
|
22
22
|
from pathlib import Path
|
|
23
|
-
from
|
|
24
|
-
from typing import Annotated, Any, ClassVar, Mapping, MutableMapping, Optional
|
|
23
|
+
from typing import Any, ClassVar, Mapping, MutableMapping, Optional
|
|
25
24
|
from warnings import warn
|
|
26
25
|
|
|
27
26
|
from mkdocs.config.defaults import MkDocsConfig
|
|
28
|
-
from mkdocstrings
|
|
29
|
-
from
|
|
30
|
-
from mkdocstrings_handlers.python.config import PythonOptions, Field, PythonConfig
|
|
31
|
-
from mkdocstrings_handlers.python.handler import PythonHandler
|
|
27
|
+
from mkdocstrings import CollectorItem, get_logger
|
|
28
|
+
from mkdocstrings_handlers.python import PythonHandler, PythonOptions, PythonConfig
|
|
32
29
|
|
|
33
30
|
from .crossref import substitute_relative_crossrefs
|
|
34
31
|
|
|
@@ -38,14 +35,6 @@ __all__ = [
|
|
|
38
35
|
|
|
39
36
|
logger = get_logger(__name__)
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
# TODO mkdocstrings 0.28
|
|
43
|
-
# - `name` and `domain` (py) must be specified as class attributes
|
|
44
|
-
# - `handler` arg to superclass is deprecated
|
|
45
|
-
# - add `mdx` arg to constructor to pass on to superclass
|
|
46
|
-
# - `config_file_path` arg will no longer be passed
|
|
47
|
-
#
|
|
48
|
-
|
|
49
38
|
# TODO python 3.9 - remove when 3.9 support is dropped
|
|
50
39
|
_dataclass_options = {"frozen": True}
|
|
51
40
|
if sys.version_info >= (3, 10):
|
|
@@ -53,23 +42,7 @@ if sys.version_info >= (3, 10):
|
|
|
53
42
|
|
|
54
43
|
@dataclass(**_dataclass_options)
|
|
55
44
|
class PythonRelXRefOptions(PythonOptions):
|
|
56
|
-
check_crossrefs:
|
|
57
|
-
bool,
|
|
58
|
-
Field(
|
|
59
|
-
group="docstrings",
|
|
60
|
-
parent="docstring_options",
|
|
61
|
-
description=dedent(
|
|
62
|
-
"""
|
|
63
|
-
Enables early checking of all cross-references.
|
|
64
|
-
|
|
65
|
-
Note that this option only takes affect if **relative_crossrefs** is
|
|
66
|
-
also true. This option is true by default, so this option is used to
|
|
67
|
-
disable checking. Checking can also be disabled on a per-case basis by
|
|
68
|
-
prefixing the reference with '?', e.g. `[something][?dontcheckme]`.
|
|
69
|
-
"""
|
|
70
|
-
),
|
|
71
|
-
),
|
|
72
|
-
] = True
|
|
45
|
+
check_crossrefs: bool = True
|
|
73
46
|
|
|
74
47
|
class PythonRelXRefHandler(PythonHandler):
|
|
75
48
|
"""Extended version of mkdocstrings Python handler
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.14.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|