mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
commit
6b4a4a9197
1
CHANGES
1
CHANGES
@ -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
|
||||
--------
|
||||
|
@ -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
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user