Skip to content

Commit a212204

Browse files
authored
FIX: account for unreleased changes to sphinx (#649)
1 parent b0d24c0 commit a212204

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

numpydoc/numpydoc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,12 @@ def mangle_docstrings(app: SphinxApp, what, name, obj, options, lines):
185185
"xref_aliases": app.config.numpydoc_xref_aliases_complete,
186186
"xref_ignore": app.config.numpydoc_xref_ignore,
187187
}
188-
189-
cfg.update(options or {})
188+
# TODO: Find a cleaner way to take care of this change away from dict
189+
# https://github.com/sphinx-doc/sphinx/issues/13942
190+
try:
191+
cfg.update(options or {})
192+
except TypeError:
193+
cfg.update(options.__dict__ or {})
190194
u_NL = "\n"
191195
if what == "module":
192196
# Strip top title

0 commit comments

Comments
 (0)