diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-07-24 00:10:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 00:10:38 +0900 |
commit | 6b4a4a91972627aae48c7d07784c7f8ff04c2a1f (patch) | |
tree | c4de1029956d7a293344ecc3d5277bbee90dfcff | |
parent | a57b9ccdf7ca889ac52f686a51aa8e4855919f3c (diff) | |
parent | 6646b68ec425feefa699a0083fac899c12ab9342 (diff) | |
download | sphinx-git-6b4a4a91972627aae48c7d07784c7f8ff04c2a1f.tar.gz |
Merge pull request #5204 from tk0miya/344_autosummary_recognizes_docstring_of_modattrs
Fix #344: autosummary does not understand docstring of module level attributes
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | sphinx/ext/autodoc/__init__.py | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -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 -------- diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index 62143fda4..4a9b59537 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -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 """ |