|
34 | 34 | # Add any Sphinx extension module names here, as strings. They can be
|
35 | 35 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
36 | 36 | # ones.
|
37 |
| -extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx"] |
| 37 | +# Add any Sphinx extension module names here, as strings. They can be extensions |
| 38 | +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 39 | +extensions = [ |
| 40 | + "sphinx.ext.autodoc", |
| 41 | + "sphinx.ext.doctest", |
| 42 | + "sphinx.ext.coverage", |
| 43 | + "sphinx.ext.todo", |
| 44 | + "sphinx.ext.intersphinx", |
| 45 | +] |
| 46 | + |
| 47 | +# Add optional extensions |
| 48 | +try: |
| 49 | + import sphinxcontrib.shellcheck # noqa: F401 |
| 50 | + |
| 51 | + extensions += ["sphinxcontrib.shellcheck"] |
| 52 | +except ImportError: |
| 53 | + pass |
38 | 54 |
|
39 | 55 | # Add any paths that contain templates here, relative to this directory.
|
40 | 56 | templates_path = ["_templates"]
|
|
44 | 60 | # This pattern also affects html_static_path and html_extra_path.
|
45 | 61 | exclude_patterns = []
|
46 | 62 |
|
| 63 | +# If true, the current module name will be prepended to all description |
| 64 | +# unit titles (such as .. function::). |
| 65 | +add_module_names = True |
| 66 | + |
| 67 | +# The name of the Pygments (syntax highlighting) style to use. |
| 68 | +pygments_style = "sphinx" |
| 69 | + |
| 70 | +# -- Options for extensions ---------------------------------------------------- |
| 71 | +autoclass_content = "init" |
| 72 | + |
| 73 | +autodoc_typehints = "description" |
47 | 74 |
|
48 | 75 | # -- Options for HTML output -------------------------------------------------
|
49 | 76 |
|
50 | 77 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
51 | 78 | # a list of builtin themes.
|
52 | 79 | #
|
53 |
| -html_theme = "pydoctheme" |
54 |
| -html_theme_path = ["."] |
55 |
| -html_theme_options = {"collapsiblesidebar": True, "googletag": False} |
| 80 | +try: |
| 81 | + import furo # noqa: F401 |
| 82 | + |
| 83 | + html_theme = "furo" |
| 84 | +except ImportError: |
| 85 | + # Theme gratefully vendored from CPython source. |
| 86 | + html_theme = "pydoctheme" |
| 87 | + html_theme_path = ["."] |
| 88 | + html_theme_options = {"collapsiblesidebar": True, "googletag": False} |
56 | 89 |
|
57 | 90 | # Add any paths that contain custom static files (such as style sheets) here,
|
58 | 91 | # relative to this directory. They are copied after the builtin static files,
|
|
0 commit comments