Skip to content

Commit 02939b4

Browse files
committed
Update Sphinx, Tox and Flake8
1 parent 6494c7f commit 02939b4

File tree

5 files changed

+160
-149
lines changed

5 files changed

+160
-149
lines changed

docs/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
autodoc_default_options = {
9090
'members': True,
9191
'inherited-members': True,
92-
'special-members': '__init__',
9392
'undoc-members': True,
9493
'show-inheritance': True
9594
}
@@ -207,8 +206,17 @@ def on_missing_reference(app, env, node, contnode):
207206
env, fromdoc, app.builder, typ, target, node, contnode)
208207

209208

209+
def on_skip_member(_app, what, name, _obj, skip, _options):
210+
if what == 'class' and name == "__init__":
211+
# we could set "special-members" to "__init__",
212+
# but this gives an error when documenting modules
213+
return False
214+
return skip
215+
216+
210217
def setup(app):
211218
app.connect('missing-reference', on_missing_reference)
219+
app.connect("autodoc-skip-member", on_skip_member)
212220

213221

214222
# be nitpicky (handle all possible problems in on_missing_reference)

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx>=3.2,<4
1+
sphinx>=3.5,<4
22
sphinx_rtd_theme>=0.5,<1

0 commit comments

Comments
 (0)