Sphinx 7.2.5__py3-none-any.whl → 7.3.0__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.
Potentially problematic release.
This version of Sphinx might be problematic. Click here for more details.
- sphinx/__init__.py +8 -9
- sphinx/addnodes.py +31 -28
- sphinx/application.py +9 -15
- sphinx/builders/__init__.py +5 -6
- sphinx/builders/_epub_base.py +17 -9
- sphinx/builders/changes.py +10 -5
- sphinx/builders/dirhtml.py +4 -2
- sphinx/builders/dummy.py +3 -2
- sphinx/builders/epub3.py +5 -3
- sphinx/builders/gettext.py +24 -7
- sphinx/builders/html/__init__.py +88 -96
- sphinx/builders/html/_assets.py +16 -16
- sphinx/builders/html/transforms.py +4 -2
- sphinx/builders/latex/__init__.py +40 -33
- sphinx/builders/latex/nodes.py +6 -2
- sphinx/builders/latex/transforms.py +17 -8
- sphinx/builders/latex/util.py +1 -1
- sphinx/builders/linkcheck.py +86 -27
- sphinx/builders/manpage.py +8 -6
- sphinx/builders/singlehtml.py +5 -4
- sphinx/builders/texinfo.py +18 -14
- sphinx/builders/text.py +3 -2
- sphinx/builders/xml.py +5 -2
- sphinx/cmd/build.py +119 -76
- sphinx/cmd/make_mode.py +21 -20
- sphinx/cmd/quickstart.py +13 -16
- sphinx/config.py +432 -250
- sphinx/deprecation.py +23 -13
- sphinx/directives/__init__.py +8 -8
- sphinx/directives/code.py +7 -7
- sphinx/directives/other.py +23 -13
- sphinx/directives/patches.py +7 -6
- sphinx/domains/__init__.py +2 -2
- sphinx/domains/c/__init__.py +796 -0
- sphinx/domains/c/_ast.py +1421 -0
- sphinx/domains/c/_ids.py +65 -0
- sphinx/domains/c/_parser.py +1048 -0
- sphinx/domains/c/_symbol.py +700 -0
- sphinx/domains/changeset.py +11 -7
- sphinx/domains/citation.py +5 -2
- sphinx/domains/cpp/__init__.py +1089 -0
- sphinx/domains/cpp/_ast.py +3635 -0
- sphinx/domains/cpp/_ids.py +537 -0
- sphinx/domains/cpp/_parser.py +2117 -0
- sphinx/domains/cpp/_symbol.py +1092 -0
- sphinx/domains/index.py +6 -4
- sphinx/domains/javascript.py +16 -13
- sphinx/domains/math.py +9 -4
- sphinx/domains/python/__init__.py +890 -0
- sphinx/domains/python/_annotations.py +507 -0
- sphinx/domains/python/_object.py +426 -0
- sphinx/domains/rst.py +12 -7
- sphinx/domains/{std.py → std/__init__.py} +19 -16
- sphinx/environment/__init__.py +21 -19
- sphinx/environment/adapters/indexentries.py +2 -2
- sphinx/environment/adapters/toctree.py +10 -9
- sphinx/environment/collectors/__init__.py +6 -3
- sphinx/environment/collectors/asset.py +4 -3
- sphinx/environment/collectors/dependencies.py +3 -2
- sphinx/environment/collectors/metadata.py +6 -5
- sphinx/environment/collectors/title.py +3 -2
- sphinx/environment/collectors/toctree.py +5 -4
- sphinx/errors.py +13 -2
- sphinx/events.py +14 -9
- sphinx/ext/apidoc.py +9 -11
- sphinx/ext/autodoc/__init__.py +105 -71
- sphinx/ext/autodoc/directive.py +7 -6
- sphinx/ext/autodoc/importer.py +132 -52
- sphinx/ext/autodoc/mock.py +7 -5
- sphinx/ext/autodoc/preserve_defaults.py +4 -3
- sphinx/ext/autodoc/type_comment.py +2 -1
- sphinx/ext/autodoc/typehints.py +5 -4
- sphinx/ext/autosectionlabel.py +3 -2
- sphinx/ext/autosummary/__init__.py +21 -17
- sphinx/ext/autosummary/generate.py +9 -9
- sphinx/ext/coverage.py +26 -20
- sphinx/ext/doctest.py +38 -33
- sphinx/ext/duration.py +1 -0
- sphinx/ext/extlinks.py +4 -3
- sphinx/ext/githubpages.py +3 -2
- sphinx/ext/graphviz.py +10 -7
- sphinx/ext/ifconfig.py +5 -5
- sphinx/ext/imgconverter.py +6 -5
- sphinx/ext/imgmath.py +9 -8
- sphinx/ext/inheritance_diagram.py +31 -31
- sphinx/ext/intersphinx.py +140 -23
- sphinx/ext/linkcode.py +3 -2
- sphinx/ext/mathjax.py +2 -1
- sphinx/ext/napoleon/__init__.py +12 -7
- sphinx/ext/napoleon/docstring.py +34 -32
- sphinx/ext/todo.py +10 -7
- sphinx/ext/viewcode.py +12 -11
- sphinx/extension.py +18 -8
- sphinx/highlighting.py +39 -20
- sphinx/io.py +17 -8
- sphinx/jinja2glue.py +16 -15
- sphinx/locale/__init__.py +30 -23
- sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.po +818 -761
- sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bg/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bn/LC_MESSAGES/sphinx.po +835 -778
- sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ca/LC_MESSAGES/sphinx.po +864 -807
- sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cak/LC_MESSAGES/sphinx.po +816 -759
- sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cs/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cy/LC_MESSAGES/sphinx.po +819 -762
- sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/da/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/el/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +856 -799
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eo/LC_MESSAGES/sphinx.po +820 -763
- sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es/LC_MESSAGES/sphinx.po +856 -799
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/et/LC_MESSAGES/sphinx.po +845 -788
- sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eu/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fa/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fi/LC_MESSAGES/sphinx.po +816 -759
- sphinx/locale/fr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr/LC_MESSAGES/sphinx.po +904 -847
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/gl/LC_MESSAGES/sphinx.js +54 -54
- sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/gl/LC_MESSAGES/sphinx.po +1506 -1449
- sphinx/locale/he/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/he/LC_MESSAGES/sphinx.po +823 -766
- sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hr/LC_MESSAGES/sphinx.po +844 -787
- sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hu/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/id/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/is/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/it/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ja/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ka/LC_MESSAGES/sphinx.po +848 -791
- sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ko/LC_MESSAGES/sphinx.po +855 -798
- sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lt/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lv/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/mk/LC_MESSAGES/sphinx.po +825 -768
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js +27 -27
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +876 -818
- sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ne/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nl/LC_MESSAGES/sphinx.po +844 -787
- sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pl/LC_MESSAGES/sphinx.po +845 -788
- sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +908 -851
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ro/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ru/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/si/LC_MESSAGES/sphinx.po +823 -766
- sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sk/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sl/LC_MESSAGES/sphinx.po +832 -775
- sphinx/locale/sphinx.pot +813 -755
- sphinx/locale/sq/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sq/LC_MESSAGES/sphinx.po +865 -808
- sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr/LC_MESSAGES/sphinx.po +835 -778
- sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr_RS/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ta/LC_MESSAGES/sphinx.js +54 -54
- sphinx/locale/ta/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ta/LC_MESSAGES/sphinx.po +1530 -1473
- sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/te/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/tr/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +833 -776
- sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ur/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/vi/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/yue/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +855 -798
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +879 -822
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +811 -754
- sphinx/parsers.py +7 -5
- sphinx/project.py +18 -11
- sphinx/pycode/__init__.py +6 -5
- sphinx/pycode/ast.py +23 -8
- sphinx/pycode/parser.py +6 -5
- sphinx/registry.py +12 -6
- sphinx/roles.py +103 -57
- sphinx/search/__init__.py +17 -18
- sphinx/search/da.py +2 -2
- sphinx/search/de.py +2 -2
- sphinx/search/en.py +1 -1
- sphinx/search/es.py +2 -2
- sphinx/search/fi.py +2 -2
- sphinx/search/fr.py +2 -2
- sphinx/search/hu.py +2 -2
- sphinx/search/it.py +2 -2
- sphinx/search/ja.py +13 -22
- sphinx/search/nl.py +2 -2
- sphinx/search/no.py +2 -2
- sphinx/search/pt.py +2 -2
- sphinx/search/ro.py +1 -1
- sphinx/search/ru.py +2 -2
- sphinx/search/sv.py +2 -2
- sphinx/search/tr.py +1 -1
- sphinx/search/zh.py +2 -3
- sphinx/templates/graphviz/graphviz.css +1 -1
- sphinx/testing/fixtures.py +41 -24
- sphinx/testing/path.py +1 -1
- sphinx/testing/util.py +142 -53
- sphinx/texinputs/sphinx.xdy +1 -1
- sphinx/texinputs/sphinxlatextables.sty +1 -1
- sphinx/texinputs/sphinxpackagesubstitutefont.sty +21 -0
- sphinx/themes/agogo/layout.html +4 -4
- sphinx/themes/agogo/static/agogo.css_t +1 -1
- sphinx/themes/agogo/theme.toml +22 -0
- sphinx/themes/basic/defindex.html +1 -1
- sphinx/themes/basic/domainindex.html +1 -1
- sphinx/themes/basic/genindex-single.html +1 -1
- sphinx/themes/basic/genindex-split.html +1 -1
- sphinx/themes/basic/genindex.html +1 -1
- sphinx/themes/basic/globaltoc.html +1 -1
- sphinx/themes/basic/layout.html +1 -1
- sphinx/themes/basic/localtoc.html +1 -1
- sphinx/themes/basic/page.html +1 -1
- sphinx/themes/basic/relations.html +1 -1
- sphinx/themes/basic/search.html +5 -20
- sphinx/themes/basic/searchbox.html +3 -3
- sphinx/themes/basic/searchfield.html +3 -3
- sphinx/themes/basic/sourcelink.html +1 -1
- sphinx/themes/basic/static/basic.css_t +1 -1
- sphinx/themes/basic/static/doctools.js +1 -1
- sphinx/themes/basic/static/language_data.js_t +2 -2
- sphinx/themes/basic/static/searchtools.js +105 -60
- sphinx/themes/basic/theme.toml +23 -0
- sphinx/themes/bizstyle/layout.html +1 -6
- sphinx/themes/bizstyle/static/bizstyle.css_t +1 -1
- sphinx/themes/bizstyle/static/bizstyle.js_t +1 -1
- sphinx/themes/bizstyle/static/css3-mediaqueries_src.js +3 -3
- sphinx/themes/bizstyle/theme.toml +12 -0
- sphinx/themes/classic/layout.html +1 -1
- sphinx/themes/classic/static/classic.css_t +1 -1
- sphinx/themes/classic/static/sidebar.js_t +1 -1
- sphinx/themes/classic/theme.toml +34 -0
- sphinx/themes/default/theme.toml +2 -0
- sphinx/themes/epub/epub-cover.html +1 -1
- sphinx/themes/epub/layout.html +1 -1
- sphinx/themes/epub/static/epub.css_t +1 -1
- sphinx/themes/epub/theme.toml +10 -0
- sphinx/themes/haiku/layout.html +3 -3
- sphinx/themes/haiku/static/haiku.css_t +2 -2
- sphinx/themes/haiku/theme.toml +16 -0
- sphinx/themes/nature/static/nature.css_t +1 -1
- sphinx/themes/nature/theme.toml +6 -0
- sphinx/themes/nonav/layout.html +1 -1
- sphinx/themes/nonav/static/nonav.css_t +1 -1
- sphinx/themes/nonav/theme.toml +10 -0
- sphinx/themes/pyramid/static/epub.css_t +1 -1
- sphinx/themes/pyramid/static/pyramid.css_t +1 -1
- sphinx/themes/pyramid/theme.toml +6 -0
- sphinx/themes/scrolls/artwork/logo.svg +1 -1
- sphinx/themes/scrolls/layout.html +2 -2
- sphinx/themes/scrolls/static/scrolls.css_t +1 -1
- sphinx/themes/scrolls/theme.toml +15 -0
- sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +1 -1
- sphinx/themes/sphinxdoc/theme.toml +6 -0
- sphinx/themes/traditional/static/traditional.css_t +1 -1
- sphinx/themes/traditional/theme.toml +9 -0
- sphinx/theming.py +427 -131
- sphinx/transforms/__init__.py +21 -24
- sphinx/transforms/compact_bullet_list.py +5 -5
- sphinx/transforms/i18n.py +30 -28
- sphinx/transforms/post_transforms/__init__.py +9 -7
- sphinx/transforms/post_transforms/code.py +4 -1
- sphinx/transforms/post_transforms/images.py +17 -13
- sphinx/transforms/references.py +3 -1
- sphinx/util/__init__.py +15 -11
- sphinx/util/_io.py +34 -0
- sphinx/util/_pathlib.py +23 -18
- sphinx/util/build_phase.py +1 -0
- sphinx/util/cfamily.py +19 -11
- sphinx/util/console.py +101 -21
- sphinx/util/display.py +3 -2
- sphinx/util/docfields.py +12 -8
- sphinx/util/docutils.py +21 -35
- sphinx/util/exceptions.py +3 -2
- sphinx/util/fileutil.py +5 -5
- sphinx/util/http_date.py +9 -2
- sphinx/util/i18n.py +40 -9
- sphinx/util/inspect.py +317 -245
- sphinx/util/inventory.py +22 -5
- sphinx/util/logging.py +81 -7
- sphinx/util/matching.py +2 -1
- sphinx/util/math.py +1 -2
- sphinx/util/nodes.py +39 -29
- sphinx/util/osutil.py +25 -6
- sphinx/util/parallel.py +6 -1
- sphinx/util/requests.py +8 -5
- sphinx/util/rst.py +8 -6
- sphinx/util/tags.py +3 -3
- sphinx/util/template.py +8 -3
- sphinx/util/typing.py +76 -42
- sphinx/versioning.py +6 -2
- sphinx/writers/html.py +1 -1
- sphinx/writers/html5.py +17 -13
- sphinx/writers/latex.py +12 -12
- sphinx/writers/manpage.py +13 -7
- sphinx/writers/texinfo.py +13 -10
- sphinx/writers/text.py +13 -23
- sphinx/writers/xml.py +1 -1
- sphinx-7.2.5.dist-info/LICENSE → sphinx-7.3.0.dist-info/LICENSE.rst +1 -1
- {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/METADATA +13 -12
- sphinx-7.3.0.dist-info/RECORD +581 -0
- sphinx/domains/c.py +0 -3906
- sphinx/domains/cpp.py +0 -8233
- sphinx/domains/python.py +0 -1769
- sphinx/themes/agogo/theme.conf +0 -20
- sphinx/themes/basic/theme.conf +0 -16
- sphinx/themes/bizstyle/theme.conf +0 -10
- sphinx/themes/classic/theme.conf +0 -32
- sphinx/themes/default/theme.conf +0 -2
- sphinx/themes/epub/theme.conf +0 -8
- sphinx/themes/haiku/theme.conf +0 -14
- sphinx/themes/nature/theme.conf +0 -4
- sphinx/themes/nonav/theme.conf +0 -8
- sphinx/themes/pyramid/theme.conf +0 -4
- sphinx/themes/scrolls/theme.conf +0 -13
- sphinx/themes/sphinxdoc/theme.conf +0 -4
- sphinx/themes/traditional/theme.conf +0 -7
- sphinx-7.2.5.dist-info/RECORD +0 -569
- {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/WHEEL +0 -0
- {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/entry_points.txt +0 -0
sphinx/deprecation.py
CHANGED
|
@@ -19,23 +19,32 @@ RemovedInNextVersionWarning = RemovedInSphinx80Warning
|
|
|
19
19
|
def _deprecation_warning(
|
|
20
20
|
module: str,
|
|
21
21
|
attribute: str,
|
|
22
|
-
canonical_name: str,
|
|
22
|
+
canonical_name: str = '',
|
|
23
23
|
*,
|
|
24
24
|
remove: tuple[int, int],
|
|
25
|
+
raises: bool = False,
|
|
25
26
|
) -> None:
|
|
26
|
-
"""Helper function for module-level deprecations using __getattr__
|
|
27
|
+
"""Helper function for module-level deprecations using ``__getattr__``.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
:param module: The module containing a deprecated object.
|
|
30
|
+
:param attribute: The name of the deprecated object.
|
|
31
|
+
:param canonical_name: Optional fully-qualified name for its replacement.
|
|
32
|
+
:param remove: Target version for removal.
|
|
33
|
+
:param raises: Indicate whether to raise an exception instead of a warning.
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
When *raises* is ``True``, an :exc:`AttributeError` is raised instead
|
|
36
|
+
of emitting a warning so that it is easy to locate deprecated objects
|
|
37
|
+
in tests that could suppress deprecation warnings.
|
|
31
38
|
|
|
32
|
-
|
|
39
|
+
Usage::
|
|
40
|
+
|
|
41
|
+
# deprecated name -> (object to return, canonical path or empty string, removal version)
|
|
33
42
|
_DEPRECATED_OBJECTS = {
|
|
34
43
|
'deprecated_name': (object_to_return, 'fully_qualified_replacement_name', (8, 0)),
|
|
35
44
|
}
|
|
36
45
|
|
|
37
46
|
|
|
38
|
-
def __getattr__(name):
|
|
47
|
+
def __getattr__(name: str) -> Any:
|
|
39
48
|
if name not in _DEPRECATED_OBJECTS:
|
|
40
49
|
msg = f'module {__name__!r} has no attribute {name!r}'
|
|
41
50
|
raise AttributeError(msg)
|
|
@@ -46,7 +55,6 @@ def _deprecation_warning(
|
|
|
46
55
|
_deprecation_warning(__name__, name, canonical_name, remove=remove)
|
|
47
56
|
return deprecated_object
|
|
48
57
|
"""
|
|
49
|
-
|
|
50
58
|
if remove == (8, 0):
|
|
51
59
|
warning_class: type[Warning] = RemovedInSphinx80Warning
|
|
52
60
|
elif remove == (9, 0):
|
|
@@ -55,12 +63,14 @@ def _deprecation_warning(
|
|
|
55
63
|
msg = f'removal version {remove!r} is invalid!'
|
|
56
64
|
raise RuntimeError(msg)
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
qualname = f'{module}.{attribute}'
|
|
59
67
|
if canonical_name:
|
|
60
|
-
message =
|
|
61
|
-
f'use {canonical_name!r} instead.')
|
|
68
|
+
message = f'The alias {qualname!r} is deprecated, use {canonical_name!r} instead.'
|
|
62
69
|
else:
|
|
63
|
-
message = f'{
|
|
70
|
+
message = f'{qualname!r} is deprecated.'
|
|
71
|
+
|
|
72
|
+
if raises:
|
|
73
|
+
raise AttributeError(message)
|
|
64
74
|
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
message = f'{message} Check CHANGES for Sphinx API modifications.'
|
|
76
|
+
warnings.warn(message, warning_class, stacklevel=3)
|
sphinx/directives/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import re
|
|
6
|
-
from typing import TYPE_CHECKING,
|
|
6
|
+
from typing import TYPE_CHECKING, ClassVar, Generic, TypeVar, cast
|
|
7
7
|
|
|
8
8
|
from docutils import nodes
|
|
9
9
|
from docutils.parsers.rst import directives, roles
|
|
@@ -14,7 +14,7 @@ from sphinx.util import docutils
|
|
|
14
14
|
from sphinx.util.docfields import DocFieldTransformer, Field, TypedField
|
|
15
15
|
from sphinx.util.docutils import SphinxDirective
|
|
16
16
|
from sphinx.util.nodes import nested_parse_with_titles
|
|
17
|
-
from sphinx.util.typing import OptionSpec # NoQA: TCH001
|
|
17
|
+
from sphinx.util.typing import ExtensionMetadata, OptionSpec # NoQA: TCH001
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
from docutils.nodes import Node
|
|
@@ -55,7 +55,7 @@ class ObjectDescription(SphinxDirective, Generic[ObjDescT]):
|
|
|
55
55
|
required_arguments = 1
|
|
56
56
|
optional_arguments = 0
|
|
57
57
|
final_argument_whitespace = True
|
|
58
|
-
option_spec: OptionSpec = {
|
|
58
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
59
59
|
'no-index': directives.flag,
|
|
60
60
|
'no-index-entry': directives.flag,
|
|
61
61
|
'no-contents-entry': directives.flag,
|
|
@@ -118,7 +118,7 @@ class ObjectDescription(SphinxDirective, Generic[ObjDescT]):
|
|
|
118
118
|
|
|
119
119
|
*name* is whatever :meth:`handle_signature()` returned.
|
|
120
120
|
"""
|
|
121
|
-
|
|
121
|
+
pass # do nothing by default
|
|
122
122
|
|
|
123
123
|
def before_content(self) -> None:
|
|
124
124
|
"""
|
|
@@ -296,7 +296,7 @@ class ObjectDescription(SphinxDirective, Generic[ObjDescT]):
|
|
|
296
296
|
# If ``:no-index:`` is set, or there are no ids on the node
|
|
297
297
|
# or any of its children, then just return the index node,
|
|
298
298
|
# as Docutils expects a target node to have at least one id.
|
|
299
|
-
if node_ids := [node_id for el in node.findall(nodes.Element)
|
|
299
|
+
if node_ids := [node_id for el in node.findall(nodes.Element) # type: ignore[var-annotated]
|
|
300
300
|
for node_id in el.get('ids', ())]:
|
|
301
301
|
target_node = nodes.target(ids=node_ids)
|
|
302
302
|
self.set_source_info(target_node)
|
|
@@ -320,7 +320,7 @@ class DefaultRole(SphinxDirective):
|
|
|
320
320
|
role_name = self.arguments[0]
|
|
321
321
|
role, messages = roles.role(role_name, self.state_machine.language,
|
|
322
322
|
self.lineno, self.state.reporter)
|
|
323
|
-
if role:
|
|
323
|
+
if role:
|
|
324
324
|
docutils.register_role('', role) # type: ignore[arg-type]
|
|
325
325
|
self.env.temp_data['default_role'] = role_name
|
|
326
326
|
else:
|
|
@@ -342,7 +342,7 @@ class DefaultDomain(SphinxDirective):
|
|
|
342
342
|
required_arguments = 1
|
|
343
343
|
optional_arguments = 0
|
|
344
344
|
final_argument_whitespace = False
|
|
345
|
-
option_spec: OptionSpec = {}
|
|
345
|
+
option_spec: ClassVar[OptionSpec] = {}
|
|
346
346
|
|
|
347
347
|
def run(self) -> list[Node]:
|
|
348
348
|
domain_name = self.arguments[0].lower()
|
|
@@ -356,7 +356,7 @@ class DefaultDomain(SphinxDirective):
|
|
|
356
356
|
return []
|
|
357
357
|
|
|
358
358
|
|
|
359
|
-
def setup(app: Sphinx) ->
|
|
359
|
+
def setup(app: Sphinx) -> ExtensionMetadata:
|
|
360
360
|
app.add_config_value("strip_signature_backslash", False, 'env')
|
|
361
361
|
directives.register_directive('default-role', DefaultRole)
|
|
362
362
|
directives.register_directive('default-domain', DefaultDomain)
|
sphinx/directives/code.py
CHANGED
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import sys
|
|
4
4
|
import textwrap
|
|
5
5
|
from difflib import unified_diff
|
|
6
|
-
from typing import TYPE_CHECKING, Any
|
|
6
|
+
from typing import TYPE_CHECKING, Any, ClassVar
|
|
7
7
|
|
|
8
8
|
from docutils import nodes
|
|
9
9
|
from docutils.parsers.rst import directives
|
|
@@ -20,7 +20,7 @@ if TYPE_CHECKING:
|
|
|
20
20
|
|
|
21
21
|
from sphinx.application import Sphinx
|
|
22
22
|
from sphinx.config import Config
|
|
23
|
-
from sphinx.util.typing import OptionSpec
|
|
23
|
+
from sphinx.util.typing import ExtensionMetadata, OptionSpec
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ class Highlight(SphinxDirective):
|
|
|
35
35
|
required_arguments = 1
|
|
36
36
|
optional_arguments = 0
|
|
37
37
|
final_argument_whitespace = False
|
|
38
|
-
option_spec: OptionSpec = {
|
|
38
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
39
39
|
'force': directives.flag,
|
|
40
40
|
'linenothreshold': directives.positive_int,
|
|
41
41
|
}
|
|
@@ -102,7 +102,7 @@ class CodeBlock(SphinxDirective):
|
|
|
102
102
|
required_arguments = 0
|
|
103
103
|
optional_arguments = 1
|
|
104
104
|
final_argument_whitespace = False
|
|
105
|
-
option_spec: OptionSpec = {
|
|
105
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
106
106
|
'force': directives.flag,
|
|
107
107
|
'linenos': directives.flag,
|
|
108
108
|
'dedent': optional_int,
|
|
@@ -287,7 +287,7 @@ class LiteralIncludeReader:
|
|
|
287
287
|
'set of "lines"'))
|
|
288
288
|
|
|
289
289
|
lines = [lines[n] for n in linelist if n < len(lines)]
|
|
290
|
-
if lines
|
|
290
|
+
if not lines:
|
|
291
291
|
raise ValueError(__('Line spec %r: no lines pulled from include file %r') %
|
|
292
292
|
(linespec, self.filename))
|
|
293
293
|
|
|
@@ -393,7 +393,7 @@ class LiteralInclude(SphinxDirective):
|
|
|
393
393
|
required_arguments = 1
|
|
394
394
|
optional_arguments = 0
|
|
395
395
|
final_argument_whitespace = True
|
|
396
|
-
option_spec: OptionSpec = {
|
|
396
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
397
397
|
'dedent': optional_int,
|
|
398
398
|
'linenos': directives.flag,
|
|
399
399
|
'lineno-start': int,
|
|
@@ -469,7 +469,7 @@ class LiteralInclude(SphinxDirective):
|
|
|
469
469
|
return [document.reporter.warning(exc, line=self.lineno)]
|
|
470
470
|
|
|
471
471
|
|
|
472
|
-
def setup(app: Sphinx) ->
|
|
472
|
+
def setup(app: Sphinx) -> ExtensionMetadata:
|
|
473
473
|
directives.register_directive('highlight', Highlight)
|
|
474
474
|
directives.register_directive('code-block', CodeBlock)
|
|
475
475
|
directives.register_directive('sourcecode', CodeBlock)
|
sphinx/directives/other.py
CHANGED
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import re
|
|
4
4
|
from os.path import abspath, relpath
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import TYPE_CHECKING, Any, cast
|
|
6
|
+
from typing import TYPE_CHECKING, Any, ClassVar, cast
|
|
7
7
|
|
|
8
8
|
from docutils import nodes
|
|
9
9
|
from docutils.parsers.rst import directives
|
|
@@ -13,7 +13,7 @@ from docutils.parsers.rst.directives.misc import Include as BaseInclude
|
|
|
13
13
|
from docutils.statemachine import StateMachine
|
|
14
14
|
|
|
15
15
|
from sphinx import addnodes
|
|
16
|
-
from sphinx.domains.changeset import VersionChange #
|
|
16
|
+
from sphinx.domains.changeset import VersionChange # NoQA: F401 # for compatibility
|
|
17
17
|
from sphinx.domains.std import StandardDomain
|
|
18
18
|
from sphinx.locale import _, __
|
|
19
19
|
from sphinx.util import docname_join, logging, url_re
|
|
@@ -22,10 +22,12 @@ from sphinx.util.matching import Matcher, patfilter
|
|
|
22
22
|
from sphinx.util.nodes import explicit_title_re
|
|
23
23
|
|
|
24
24
|
if TYPE_CHECKING:
|
|
25
|
+
from collections.abc import Sequence
|
|
26
|
+
|
|
25
27
|
from docutils.nodes import Element, Node
|
|
26
28
|
|
|
27
29
|
from sphinx.application import Sphinx
|
|
28
|
-
from sphinx.util.typing import OptionSpec
|
|
30
|
+
from sphinx.util.typing import ExtensionMetadata, OptionSpec
|
|
29
31
|
|
|
30
32
|
|
|
31
33
|
glob_re = re.compile(r'.*[*?\[].*')
|
|
@@ -43,6 +45,7 @@ class TocTree(SphinxDirective):
|
|
|
43
45
|
Directive to notify Sphinx about the hierarchical structure of the docs,
|
|
44
46
|
and to include a table-of-contents like tree in the current document.
|
|
45
47
|
"""
|
|
48
|
+
|
|
46
49
|
has_content = True
|
|
47
50
|
required_arguments = 0
|
|
48
51
|
optional_arguments = 0
|
|
@@ -173,11 +176,12 @@ class Author(SphinxDirective):
|
|
|
173
176
|
Directive to give the name of the author of the current document
|
|
174
177
|
or section. Shown in the output only if the show_authors option is on.
|
|
175
178
|
"""
|
|
179
|
+
|
|
176
180
|
has_content = False
|
|
177
181
|
required_arguments = 1
|
|
178
182
|
optional_arguments = 0
|
|
179
183
|
final_argument_whitespace = True
|
|
180
|
-
option_spec: OptionSpec = {}
|
|
184
|
+
option_spec: ClassVar[OptionSpec] = {}
|
|
181
185
|
|
|
182
186
|
def run(self) -> list[Node]:
|
|
183
187
|
if not self.config.show_authors:
|
|
@@ -206,6 +210,7 @@ class SeeAlso(BaseAdmonition):
|
|
|
206
210
|
"""
|
|
207
211
|
An admonition mentioning things to look at as reference.
|
|
208
212
|
"""
|
|
213
|
+
|
|
209
214
|
node_class = addnodes.seealso
|
|
210
215
|
|
|
211
216
|
|
|
@@ -213,11 +218,12 @@ class TabularColumns(SphinxDirective):
|
|
|
213
218
|
"""
|
|
214
219
|
Directive to give an explicit tabulary column definition to LaTeX.
|
|
215
220
|
"""
|
|
221
|
+
|
|
216
222
|
has_content = False
|
|
217
223
|
required_arguments = 1
|
|
218
224
|
optional_arguments = 0
|
|
219
225
|
final_argument_whitespace = True
|
|
220
|
-
option_spec: OptionSpec = {}
|
|
226
|
+
option_spec: ClassVar[OptionSpec] = {}
|
|
221
227
|
|
|
222
228
|
def run(self) -> list[Node]:
|
|
223
229
|
node = addnodes.tabular_col_spec()
|
|
@@ -230,11 +236,12 @@ class Centered(SphinxDirective):
|
|
|
230
236
|
"""
|
|
231
237
|
Directive to create a centered line of bold text.
|
|
232
238
|
"""
|
|
239
|
+
|
|
233
240
|
has_content = False
|
|
234
241
|
required_arguments = 1
|
|
235
242
|
optional_arguments = 0
|
|
236
243
|
final_argument_whitespace = True
|
|
237
|
-
option_spec: OptionSpec = {}
|
|
244
|
+
option_spec: ClassVar[OptionSpec] = {}
|
|
238
245
|
|
|
239
246
|
def run(self) -> list[Node]:
|
|
240
247
|
if not self.arguments:
|
|
@@ -252,11 +259,12 @@ class Acks(SphinxDirective):
|
|
|
252
259
|
"""
|
|
253
260
|
Directive for a list of names.
|
|
254
261
|
"""
|
|
262
|
+
|
|
255
263
|
has_content = True
|
|
256
264
|
required_arguments = 0
|
|
257
265
|
optional_arguments = 0
|
|
258
266
|
final_argument_whitespace = False
|
|
259
|
-
option_spec: OptionSpec = {}
|
|
267
|
+
option_spec: ClassVar[OptionSpec] = {}
|
|
260
268
|
|
|
261
269
|
def run(self) -> list[Node]:
|
|
262
270
|
node = addnodes.acks()
|
|
@@ -274,11 +282,12 @@ class HList(SphinxDirective):
|
|
|
274
282
|
"""
|
|
275
283
|
Directive for a list that gets compacted horizontally.
|
|
276
284
|
"""
|
|
285
|
+
|
|
277
286
|
has_content = True
|
|
278
287
|
required_arguments = 0
|
|
279
288
|
optional_arguments = 0
|
|
280
289
|
final_argument_whitespace = False
|
|
281
|
-
option_spec: OptionSpec = {
|
|
290
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
282
291
|
'columns': int,
|
|
283
292
|
}
|
|
284
293
|
|
|
@@ -311,11 +320,12 @@ class Only(SphinxDirective):
|
|
|
311
320
|
"""
|
|
312
321
|
Directive to only include text if the given tag(s) are enabled.
|
|
313
322
|
"""
|
|
323
|
+
|
|
314
324
|
has_content = True
|
|
315
325
|
required_arguments = 1
|
|
316
326
|
optional_arguments = 0
|
|
317
327
|
final_argument_whitespace = True
|
|
318
|
-
option_spec: OptionSpec = {}
|
|
328
|
+
option_spec: ClassVar[OptionSpec] = {}
|
|
319
329
|
|
|
320
330
|
def run(self) -> list[Node]:
|
|
321
331
|
node = addnodes.only()
|
|
@@ -371,14 +381,14 @@ class Include(BaseInclude, SphinxDirective):
|
|
|
371
381
|
"correctly", i.e. relative to source directory.
|
|
372
382
|
"""
|
|
373
383
|
|
|
374
|
-
def run(self) ->
|
|
384
|
+
def run(self) -> Sequence[Node]:
|
|
375
385
|
|
|
376
386
|
# To properly emit "include-read" events from included RST text,
|
|
377
387
|
# we must patch the ``StateMachine.insert_input()`` method.
|
|
378
388
|
# In the future, docutils will hopefully offer a way for Sphinx
|
|
379
389
|
# to provide the RST parser to use
|
|
380
390
|
# when parsing RST text that comes in via Include directive.
|
|
381
|
-
def _insert_input(include_lines, source):
|
|
391
|
+
def _insert_input(include_lines: list[str], source: str) -> None:
|
|
382
392
|
# First, we need to combine the lines back into text so that
|
|
383
393
|
# we can send it with the include-read event.
|
|
384
394
|
# In docutils 0.18 and later, there are two lines at the end
|
|
@@ -405,7 +415,7 @@ class Include(BaseInclude, SphinxDirective):
|
|
|
405
415
|
# Only enable this patch if there are listeners for 'include-read'.
|
|
406
416
|
if self.env.app.events.listeners.get('include-read'):
|
|
407
417
|
# See https://github.com/python/mypy/issues/2427 for details on the mypy issue
|
|
408
|
-
self.state_machine.insert_input = _insert_input
|
|
418
|
+
self.state_machine.insert_input = _insert_input
|
|
409
419
|
|
|
410
420
|
if self.arguments[0].startswith('<') and \
|
|
411
421
|
self.arguments[0].endswith('>'):
|
|
@@ -417,7 +427,7 @@ class Include(BaseInclude, SphinxDirective):
|
|
|
417
427
|
return super().run()
|
|
418
428
|
|
|
419
429
|
|
|
420
|
-
def setup(app: Sphinx) ->
|
|
430
|
+
def setup(app: Sphinx) -> ExtensionMetadata:
|
|
421
431
|
directives.register_directive('toctree', TocTree)
|
|
422
432
|
directives.register_directive('sectionauthor', Author)
|
|
423
433
|
directives.register_directive('moduleauthor', Author)
|
sphinx/directives/patches.py
CHANGED
|
@@ -2,13 +2,13 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
from os import path
|
|
5
|
-
from typing import TYPE_CHECKING,
|
|
5
|
+
from typing import TYPE_CHECKING, ClassVar, cast
|
|
6
6
|
|
|
7
7
|
from docutils import nodes
|
|
8
8
|
from docutils.nodes import Node, make_id
|
|
9
9
|
from docutils.parsers.rst import directives
|
|
10
10
|
from docutils.parsers.rst.directives import images, tables
|
|
11
|
-
from docutils.parsers.rst.directives.misc import Meta
|
|
11
|
+
from docutils.parsers.rst.directives.misc import Meta
|
|
12
12
|
from docutils.parsers.rst.roles import set_classes
|
|
13
13
|
|
|
14
14
|
from sphinx.directives import optional_int
|
|
@@ -21,7 +21,7 @@ from sphinx.util.osutil import SEP, os_path, relpath
|
|
|
21
21
|
|
|
22
22
|
if TYPE_CHECKING:
|
|
23
23
|
from sphinx.application import Sphinx
|
|
24
|
-
from sphinx.util.typing import OptionSpec
|
|
24
|
+
from sphinx.util.typing import ExtensionMetadata, OptionSpec
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
logger = logging.getLogger(__name__)
|
|
@@ -80,8 +80,9 @@ class Code(SphinxDirective):
|
|
|
80
80
|
|
|
81
81
|
This is compatible with docutils' :rst:dir:`code` directive.
|
|
82
82
|
"""
|
|
83
|
+
|
|
83
84
|
optional_arguments = 1
|
|
84
|
-
option_spec: OptionSpec = {
|
|
85
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
85
86
|
'class': directives.class_option,
|
|
86
87
|
'force': directives.flag,
|
|
87
88
|
'name': directives.unchanged,
|
|
@@ -126,7 +127,7 @@ class MathDirective(SphinxDirective):
|
|
|
126
127
|
required_arguments = 0
|
|
127
128
|
optional_arguments = 1
|
|
128
129
|
final_argument_whitespace = True
|
|
129
|
-
option_spec: OptionSpec = {
|
|
130
|
+
option_spec: ClassVar[OptionSpec] = {
|
|
130
131
|
'label': directives.unchanged,
|
|
131
132
|
'name': directives.unchanged,
|
|
132
133
|
'class': directives.class_option,
|
|
@@ -175,7 +176,7 @@ class MathDirective(SphinxDirective):
|
|
|
175
176
|
ret.insert(0, target)
|
|
176
177
|
|
|
177
178
|
|
|
178
|
-
def setup(app: Sphinx) ->
|
|
179
|
+
def setup(app: Sphinx) -> ExtensionMetadata:
|
|
179
180
|
directives.register_directive('figure', Figure)
|
|
180
181
|
directives.register_directive('meta', Meta)
|
|
181
182
|
directives.register_directive('csv-table', CSVTable)
|
sphinx/domains/__init__.py
CHANGED
|
@@ -93,7 +93,7 @@ class Index(ABC):
|
|
|
93
93
|
shortname: str | None = None
|
|
94
94
|
|
|
95
95
|
def __init__(self, domain: Domain) -> None:
|
|
96
|
-
if self.name
|
|
96
|
+
if not self.name or self.localname is None:
|
|
97
97
|
raise SphinxError('Index subclass %s has no valid name or localname'
|
|
98
98
|
% self.__class__.__name__)
|
|
99
99
|
self.domain = domain
|
|
@@ -296,7 +296,7 @@ class Domain:
|
|
|
296
296
|
"""Remove traces of a document in the domain-specific inventories."""
|
|
297
297
|
pass
|
|
298
298
|
|
|
299
|
-
def merge_domaindata(self, docnames: list[str], otherdata: dict) -> None:
|
|
299
|
+
def merge_domaindata(self, docnames: list[str], otherdata: dict[str, Any]) -> None:
|
|
300
300
|
"""Merge in data regarding *docnames* from a different domaindata
|
|
301
301
|
inventory (coming from a subprocess in parallel builds).
|
|
302
302
|
"""
|