Skip to content

Commit 6ee18b8

Browse files
authored
Use intersphinx_registry to keep intersphinx_mapping up to date. (#604)
This makes sure that the intersphinx_mapping is up to date with the latest packages, and allow to update URLs in a single place.
1 parent 1ef9f67 commit 6ee18b8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

docs/conf.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#
1515
import os
1616
import sys
17+
from intersphinx_registry import get_intersphinx_mapping
1718

1819
try:
1920
from ipympl import __version__ as release
@@ -50,12 +51,9 @@
5051
nitpicky = True # warn if cross-references are missing
5152

5253
# Intersphinx settings
53-
intersphinx_mapping = {
54-
"ipywidgets": ("https://ipywidgets.readthedocs.io/en/stable", None),
55-
"matplotlib": ("https://matplotlib.org/stable", None),
56-
"numpy": ("https://numpy.org/doc/stable", None),
57-
"python": ("https://docs.python.org/3", None),
58-
}
54+
intersphinx_mapping = get_intersphinx_mapping(
55+
packages={"ipywidgets", "matplotlib", "numpy", "python"}
56+
)
5957

6058

6159
# Settings for copybutton

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ docs = [
6262
"sphinx-copybutton",
6363
"sphinx-thebe",
6464
"sphinx-togglebutton",
65+
"intersphinx_registry",
6566
]
6667

6768
[project.urls]

0 commit comments

Comments
 (0)