Skip to content

Commit 8c8d7d2

Browse files
authored
Rely on intrsphinx_registry to keep intersphinx up to date. (ipython#1290)
1 parent c353ddf commit 8c8d7d2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/conf.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
from pathlib import Path
1616
from typing import Any
1717

18+
from intersphinx_registry import get_intersphinx_mapping
19+
1820
# If extensions (or modules to document with autodoc) are in another directory,
1921
# add these directories to sys.path here. If the directory is relative to the
2022
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -303,11 +305,9 @@
303305

304306

305307
# Example configuration for intersphinx: refer to the Python standard library.
306-
intersphinx_mapping = {
307-
"python": ("https://docs.python.org/3/", None),
308-
"ipython": ("https://ipython.readthedocs.io/en/latest", None),
309-
"jupyter": ("https://jupyter.readthedocs.io/en/latest", None),
310-
}
308+
309+
310+
intersphinx_mapping = get_intersphinx_mapping(packages={"ipython", "python", "jupyter"})
311311

312312

313313
def setup(app):

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ docs = [
5151
"sphinxcontrib_github_alt",
5252
"sphinxcontrib-spelling",
5353
"sphinx-autodoc-typehints",
54+
"intersphinx_registry",
5455
"trio"
5556
]
5657
test = [

0 commit comments

Comments
 (0)