|
13 | 13 | import os |
14 | 14 | import shutil |
15 | 15 | from pathlib import Path |
16 | | -from typing import Any, Dict, List |
| 16 | +from typing import Any |
| 17 | + |
| 18 | +from intersphinx_registry import get_intersphinx_mapping |
17 | 19 |
|
18 | 20 | # If extensions (or modules to document with autodoc) are in another directory, |
19 | 21 | # add these directories to sys.path here. If the directory is relative to the |
|
70 | 72 | # built documents. |
71 | 73 | # |
72 | 74 |
|
73 | | -version_ns: Dict[str, Any] = {} |
| 75 | +version_ns: dict[str, Any] = {} |
74 | 76 | here = Path(__file__).parent.resolve() |
75 | 77 | version_py = Path(here) / os.pardir / "ipykernel" / "_version.py" |
76 | 78 | with open(version_py) as f: |
|
159 | 161 | # Add any paths that contain custom static files (such as style sheets) here, |
160 | 162 | # relative to this directory. They are copied after the builtin static files, |
161 | 163 | # so a file named "default.css" will overwrite the builtin "default.css". |
162 | | -html_static_path: List[str] = [] |
| 164 | +html_static_path: list[str] = [] |
163 | 165 |
|
164 | 166 | # Add any extra paths that contain custom files (such as robots.txt or |
165 | 167 | # .htaccess) here, relative to this directory. These files are copied |
|
226 | 228 |
|
227 | 229 | # -- Options for LaTeX output --------------------------------------------- |
228 | 230 |
|
229 | | -latex_elements: Dict[str, object] = {} |
| 231 | +latex_elements: dict[str, object] = {} |
230 | 232 |
|
231 | 233 | # Grouping the document tree into LaTeX files. List of tuples |
232 | 234 | # (source start file, target name, title, |
|
303 | 305 |
|
304 | 306 |
|
305 | 307 | # 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"}) |
311 | 311 |
|
312 | 312 |
|
313 | 313 | def setup(app): |
|
0 commit comments