Skip to content

Commit 78e26bc

Browse files
committed
update theme
1 parent 8aab8ee commit 78e26bc

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

docs/conf.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,18 @@
4747
"sphinx.ext.mathjax",
4848
"sphinx.ext.napoleon",
4949
"sphinx.ext.githubpages",
50+
"sphinx.ext.autodoc.typehints",
5051
]
5152

5253
# autodoc options
5354

55+
autodoc_type_aliases = {}
56+
57+
# this does not work properly yet
58+
autodoc_typehints = "none"
59+
autodoc_typehints_format = "short"
60+
autodoc_typehints_description_target = "documented"
61+
5462
autodoc_default_options = {
5563
"undoc-members": True,
5664
"show-inheritance": True,
@@ -60,14 +68,17 @@
6068

6169
autoclass_content = "class"
6270

71+
6372
def skip(app, what, name, obj, would_skip, options):
6473
if name.startswith('_'):
6574
return True
6675
return would_skip
6776

77+
6878
def setup(app):
6979
app.connect("autodoc-skip-member", skip)
7080

81+
7182
# autosummary options
7283

7384
autosummary_generate = True
@@ -93,15 +104,19 @@ def setup(app):
93104

94105
# docstring sections
95106

107+
96108
def parse_attributes_section(self, section):
97109
return self._format_fields("Attributes", self._consume_fields())
98110

111+
99112
NumpyDocstring._parse_attributes_section = parse_attributes_section
100113

114+
101115
def patched_parse(self):
102116
self._sections["attributes"] = self._parse_attributes_section
103117
self._unpatched_parse()
104118

119+
105120
NumpyDocstring._unpatched_parse = NumpyDocstring._parse
106121
NumpyDocstring._parse = patched_parse
107122

@@ -167,11 +182,12 @@ def linkcode_resolve(domain, info):
167182
}
168183

169184
html_context = {}
170-
html_static_path = []
185+
html_static_path = sphinx_compas_theme.get_html_static_path()
171186
html_extra_path = []
172187
html_last_updated_fmt = ""
173188
html_copy_source = False
174189
html_show_sourcelink = False
175190
html_permalinks = False
176191
html_permalinks_icon = ""
192+
html_experimental_html5_writer = False
177193
html_compact_lists = True

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ m2r
1313
nbsphinx
1414
pydocstyle
1515
pytest >=3.2
16-
sphinx_compas_theme >=0.14.2
16+
sphinx_compas_theme >=0.15
1717
sphinx >=3.4
1818
twine
1919
wheel

0 commit comments

Comments
 (0)