File: conf.py

package info (click to toggle)
python-sh 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 900 kB
  • sloc: python: 4,157; makefile: 25
file content (62 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Configuration file for the Sphinx documentation builder.

from pathlib import Path

import toml

_THIS_DIR = Path(__file__).parent
_REPO = _THIS_DIR.parent.parent
_PYPROJECT = _REPO / "pyproject.toml"

pyproject = toml.load(_PYPROJECT)
nitpicky = True

nitpick_ignore = [
    ("py:class", "Token"),
    ("py:class", "'Token'"),
]

nitpick_ignore_regex = [
    ("py:class", r".*lark.*"),
]

version = pyproject["tool"]["poetry"]["version"]
release = version

# -- Project information

project = "sh"
copyright = "2023, Andrew Moffat"
author = "Andrew Moffat"

# -- General configuration

extensions = [
    "sphinx.ext.duration",
    "sphinx.ext.doctest",
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.intersphinx",
    "sphinx.ext.todo",
]

intersphinx_mapping = {
    "python": ("https://docs.python.org/3/", None),
    "sphinx": ("https://www.sphinx-doc.org/en/master/", None),
    "lark": ("https://lark-parser.readthedocs.io/en/latest/", None),
    "jinja2": ("https://jinja.palletsprojects.com/en/latest/", None),
}
intersphinx_disabled_domains = ["std"]

templates_path = ["_templates"]

# -- Options for HTML output

html_theme = "sphinx_rtd_theme"

# -- Options for EPUB output
epub_show_urls = "footnote"

autodoc_typehints = "both"

add_module_names = False