Last active
April 11, 2021 04:22
-
-
Save EpicWink/ed8f471a17c3c3a6ff13c5c483669489 to your computer and use it in GitHub Desktop.
Fixes TypeError when using Sphinx 3.4 with autodocsumm (add to your conf.py)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import autodocsumm | |
def make_get_doc(original): | |
def get_doc(*args, **kwargs): | |
r = original(*args, **kwargs) | |
return r or [] | |
return get_doc | |
clss = [ | |
autodocsumm.AutoSummClassDocumenter, | |
autodocsumm.AutoSummModuleDocumenter, | |
autodocsumm.CallableAttributeDocumenter, | |
autodocsumm.NoDataDataDocumenter, | |
autodocsumm.NoDataAttributeDocumenter, | |
] | |
for cls in clss: | |
cls.get_doc = make_get_doc(cls.get_doc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment