-
Notifications
You must be signed in to change notification settings - Fork 348
/
Copy pathconf.py
64 lines (48 loc) · 1.71 KB
/
conf.py
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
63
64
import datetime
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext")))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"pytestdocs",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = ".rst"
# The master toctree document.
master_doc = "index"
# General information about the project.
project = "pytest-django"
copyright = (
f"{datetime.datetime.now(tz=datetime.timezone.utc).year}, Andreas Pelme and contributors"
)
exclude_patterns = ["_build"]
pygments_style = "sphinx"
html_theme = "sphinx_rtd_theme"
# Output file base name for HTML help builder.
htmlhelp_basename = "pytest-djangodoc"
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"django": (
"https://docs.djangoproject.com/en/stable/",
"https://docs.djangoproject.com/en/stable/_objects/",
),
"pytest": ("https://docs.pytest.org/en/stable/", None),
}
# Warn about all references where the target cannot be found
nitpicky = True
def setup(app):
# Allow linking to pytest's confvals.
app.add_object_type(
"confval",
"pytest-confval",
objname="configuration value",
indextemplate="pair: %s; configuration value",
)