Skip to content

Commit

Permalink
Merge pull request #2225 from certtools/fix-2224
Browse files Browse the repository at this point in the history
docs: workaround for sphinx-doc/sphinx#10701
  • Loading branch information
sebix committed Jul 25, 2022
2 parents 469dc49 + 2ba2603 commit 80a149a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -98,6 +98,7 @@ CHANGELOG
### Documentation
- Feeds: Add documentation for newly supported dataplane feeds, see above (PR#2102 by Mikk Margus Möll).
- Installation: Restructured the whole document to make it clearer and straight-forward (PR#2113 by Sebastian Wagner).
- Add workaround for https://github.com/sphinx-doc/sphinx/issues/10701 (PR#2225 by Sebastian Wagner, kudos @yarikoptic, fixes #2224).

### Packaging

Expand Down
22 changes: 22 additions & 0 deletions docs/conf.py
Expand Up @@ -116,3 +116,25 @@ def run_autogen(_):
def setup(app):
app.connect("builder-inited", run_apidoc)
app.connect("builder-inited", run_autogen)



import sphinx
if sphinx.__version__ == '5.1.0':
# see https://github.com/sphinx-doc/sphinx/issues/10701
# workaround copied from https://github.com/datalad/datalad/pull/6883

# Although crash happens within NumpyDocstring, it is subclass of GoogleDocstring
# so we need to overload method there
from sphinx.ext.napoleon.docstring import GoogleDocstring
from functools import wraps


@wraps(GoogleDocstring._consume_inline_attribute)
def _consume_inline_attribute_safe(self):
try:
return self._consume_inline_attribute_safe()
except:
return "", []

GoogleDocstring._consume_inline_attribute = _consume_inline_attribute_safe

0 comments on commit 80a149a

Please sign in to comment.