Merge pull request #5204 from tk0miya/344_autosummary_recognizes_docstring_of_modattrs

Fix #344: autosummary does not understand docstring of module level attributes
This commit is contained in:
Takeshi KOMIYA 2018-07-24 00:10:38 +09:00 committed by GitHub
commit 6b4a4a9197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -176,6 +176,7 @@ Bugs fixed
* #5133: latex: index headings "Symbols" and "Numbers" not internationalized
* #5114: sphinx-build: Handle errors on scanning documents
* epub: spine has been broken when "self" is listed on toctree (refs: #4611)
* #344: autosummary does not understand docstring of module level attributes
Testing
--------

View File

@ -1265,6 +1265,11 @@ class DataDocumenter(ModuleLevelDocumenter):
# type: (bool) -> None
pass
def get_real_modname(self):
# type: () -> str
return self.get_attr(self.parent or self.object, '__module__', None) \
or self.modname
class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: ignore
"""