|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | + |
| 3 | +from pathlib import Path |
| 4 | + |
| 5 | +import toml |
| 6 | + |
| 7 | +_THIS_DIR = Path(__file__).parent |
| 8 | +_REPO = _THIS_DIR.parent.parent |
| 9 | +_PYPROJECT = _REPO / "pyproject.toml" |
| 10 | + |
| 11 | +pyproject = toml.load(_PYPROJECT) |
| 12 | +nitpicky = True |
| 13 | + |
| 14 | +nitpick_ignore = [ |
| 15 | + ("py:class", "Token"), |
| 16 | + ("py:class", "'Token'"), |
| 17 | +] |
| 18 | + |
| 19 | +nitpick_ignore_regex = [ |
| 20 | + ("py:class", r".*lark.*"), |
| 21 | +] |
| 22 | + |
| 23 | +version = pyproject["tool"]["poetry"]["version"] |
| 24 | +release = version |
| 25 | + |
| 26 | +# -- Project information |
| 27 | + |
| 28 | +project = "sh" |
| 29 | +copyright = "2023, Andrew Moffat" |
| 30 | +author = "Andrew Moffat" |
| 31 | + |
| 32 | +# -- General configuration |
| 33 | + |
| 34 | +extensions = [ |
| 35 | + "sphinx.ext.duration", |
| 36 | + "sphinx.ext.doctest", |
| 37 | + "sphinx.ext.autodoc", |
| 38 | + "sphinx.ext.autosummary", |
| 39 | + "sphinx.ext.intersphinx", |
| 40 | + "sphinx.ext.todo", |
| 41 | +] |
| 42 | + |
| 43 | +intersphinx_mapping = { |
| 44 | + "python": ("https://docs.python.org/3/", None), |
| 45 | + "sphinx": ("https://www.sphinx-doc.org/en/master/", None), |
| 46 | + "lark": ("https://lark-parser.readthedocs.io/en/latest/", None), |
| 47 | + "jinja2": ("https://jinja.palletsprojects.com/en/latest/", None), |
| 48 | +} |
| 49 | +intersphinx_disabled_domains = ["std"] |
| 50 | + |
| 51 | +templates_path = ["_templates"] |
| 52 | + |
| 53 | +# -- Options for HTML output |
| 54 | + |
| 55 | +html_theme = "sphinx_rtd_theme" |
| 56 | + |
| 57 | +# -- Options for EPUB output |
| 58 | +epub_show_urls = "footnote" |
| 59 | + |
| 60 | +autodoc_typehints = "both" |
| 61 | + |
| 62 | +add_module_names = False |
0 commit comments