|
| 1 | +"""Sphinx config file.""" |
1 | 2 | # tdl documentation build configuration file, created by |
2 | 3 | # sphinx-quickstart on Fri Nov 25 12:49:46 2016. |
3 | 4 | # |
|
14 | 15 | # add these directories to sys.path here. If the directory is relative to the |
15 | 16 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
16 | 17 | # |
| 18 | +from __future__ import annotations |
| 19 | + |
17 | 20 | import os |
18 | 21 | import re |
19 | 22 | import subprocess |
20 | 23 | import sys |
21 | | -from typing import Dict |
| 24 | +from pathlib import Path |
22 | 25 |
|
23 | | -sys.path.insert(0, os.path.abspath("..")) |
| 26 | +sys.path.insert(0, str(Path("..").resolve(strict=True))) |
24 | 27 |
|
25 | 28 | # -- General configuration ------------------------------------------------ |
26 | 29 |
|
|
66 | 69 | # built documents. |
67 | 70 | # |
68 | 71 | # The full version, including alpha/beta/rc tags. |
69 | | -git_describe = subprocess.run(["git", "describe", "--abbrev=0"], stdout=subprocess.PIPE, text=True, check=True) |
| 72 | +git_describe = subprocess.run( |
| 73 | + ["git", "describe", "--abbrev=0"], # noqa: S603, S607 |
| 74 | + stdout=subprocess.PIPE, |
| 75 | + text=True, |
| 76 | + check=True, |
| 77 | +) |
70 | 78 | release = git_describe.stdout.strip() |
71 | 79 | assert release |
72 | 80 | print("release version: %r" % release) |
|
143 | 151 | # a list of builtin themes. |
144 | 152 | # |
145 | 153 |
|
146 | | -html_theme = "sphinx_rtd_theme" |
| 154 | +html_theme = "furo" |
147 | 155 |
|
148 | 156 | # Theme options are theme-specific and customize the look and feel of a theme |
149 | 157 | # further. For a list of options available for each theme, see the |
|
263 | 271 |
|
264 | 272 | # -- Options for LaTeX output --------------------------------------------- |
265 | 273 |
|
266 | | -latex_elements: Dict[str, str] = { |
| 274 | +latex_elements: dict[str, str] = { |
267 | 275 | # The paper size ('letterpaper' or 'a4paper'). |
268 | 276 | # 'papersize': 'letterpaper', |
269 | 277 | # The font size ('10pt', '11pt' or '12pt'). |
|
374 | 382 |
|
375 | 383 | # Example configuration for intersphinx: refer to the Python standard library. |
376 | 384 | intersphinx_mapping = { |
377 | | - "https://docs.python.org/3/": None, |
378 | | - "https://numpy.org/doc/stable/": None, |
| 385 | + "python": ("https://docs.python.org/3/", None), |
| 386 | + "numpy": ("https://numpy.org/doc/stable/", None), |
379 | 387 | } |
380 | 388 |
|
381 | 389 | os.environ["READTHEDOCS"] = "True" |
0 commit comments