From 5e39f152b2da325e72695ca07cc6ebb41ba4e9c1 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sat, 13 Apr 2024 13:37:04 +0200 Subject: [PATCH] intersphinx, fixup of f3d23b --- sphinx/domains/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sphinx/domains/__init__.py b/sphinx/domains/__init__.py index eac05327c09..f1adbaf62a5 100644 --- a/sphinx/domains/__init__.py +++ b/sphinx/domains/__init__.py @@ -426,7 +426,16 @@ def intersphinx_add_entries_v2(self, store: Any, that should not be inspected by the domain, but merely returned as a result of reference resolution. - The domain must store the given data in the given *store*, + For example, for Python the data could look like the following. + + .. code-block:: python + + data = { + 'class': {'pkg.mod.Foo': SomeIntersphinxData(...)}, + 'method': {'pkg.mod.Foo.bar': SomeIntersphinxData(...)}, + } + + The domain must store the given inner intersphinx data in the given *store*, in whichever way makes sense for later reference resolution. This *store* was initially a copy of :attr:`initial_intersphinx_inventory`.