File: conf.py

package info (click to toggle)
fava 1.30.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,856 kB
  • sloc: javascript: 45,789; python: 11,087; makefile: 112; sh: 25
file content (56 lines) | stat: -rw-r--r-- 1,480 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
from __future__ import annotations

from typing import Any

extensions = [
    "sphinx.ext.extlinks",
    "sphinx.ext.napoleon",
    "sphinx.ext.autodoc",
    "sphinx_autodoc_typehints",
    "sphinx.ext.intersphinx",
]
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

# General information about the project.
project = "Fava"
copyright = "2016, Dominik Aumayr"  # noqa: A001
author = "Dominik Aumayr"

extlinks = {
    "bug": ("https://github.com/beancount/fava/issues/%s", "#%s"),
    "user": ("https://github.com/%s", "@%s"),
}

autodoc_default_options = {"members": True, "undoc-members": True}
typehints_use_rtype = False


def skip_namedtuples(
    _app: Any, _what: Any, _name: Any, obj: Any, _options: Any, _lines: Any
) -> bool | None:
    docstr = obj.__doc__
    if isinstance(docstr, str) and docstr.startswith("Alias for field number"):
        return True
    return None


def setup(app: Any) -> None:
    app.connect("autodoc-skip-member", skip_namedtuples)


desc = 'Web interface for <a href="http://furius.ca/beancount/">Beancount</a>'

# Set templates path to add extra links to navigation
# (in templates/sidebar/navigation.html)
templates_path = ["templates"]

# Options for HTML output
html_theme = "furo"
html_title = "Fava"
html_static_path = ["static"]
html_logo = "static/logo.png"
html_theme_options = {
    "source_repository": "https://github.com/beancount/fava/",
    "source_branch": "main",
    "source_directory": "docs/",
}