mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fix: autosummary of modules broken in Sphinx-1.2.3. closes #1585
This commit is contained in:
parent
ee245c7bf1
commit
4a517af21c
1
CHANGES
1
CHANGES
@ -21,6 +21,7 @@ Bugs fixed
|
|||||||
* #1576: Special toctree entry "self" located after another entry that also has
|
* #1576: Special toctree entry "self" located after another entry that also has
|
||||||
a toctree was replaced with wrong title and link.
|
a toctree was replaced with wrong title and link.
|
||||||
* #1584: Point to master doc in HTML "top" link.
|
* #1584: Point to master doc in HTML "top" link.
|
||||||
|
* #1585: Autosummary of modules broken in Sphinx-1.2.3.
|
||||||
|
|
||||||
|
|
||||||
Release 1.2.3 (released Sep 1, 2014)
|
Release 1.2.3 (released Sep 1, 2014)
|
||||||
|
@ -58,6 +58,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import inspect
|
import inspect
|
||||||
import posixpath
|
import posixpath
|
||||||
|
from types import ModuleType
|
||||||
|
|
||||||
from docutils.parsers.rst import directives
|
from docutils.parsers.rst import directives
|
||||||
from docutils.statemachine import ViewList
|
from docutils.statemachine import ViewList
|
||||||
@ -251,7 +252,7 @@ class Autosummary(Directive):
|
|||||||
|
|
||||||
self.result = ViewList() # initialize for each documenter
|
self.result = ViewList() # initialize for each documenter
|
||||||
full_name = real_name
|
full_name = real_name
|
||||||
if full_name.startswith(modname + '.'):
|
if not isinstance(obj, ModuleType):
|
||||||
# give explicitly separated module name, so that members
|
# give explicitly separated module name, so that members
|
||||||
# of inner classes can be documented
|
# of inner classes can be documented
|
||||||
full_name = modname + '::' + full_name[len(modname)+1:]
|
full_name = modname + '::' + full_name[len(modname)+1:]
|
||||||
|
Loading…
Reference in New Issue
Block a user