Merge pull request #1277 from emmanuelle/api_layout

In API docs page, place table of contents at the top
This commit is contained in:
Stefan van der Walt
2014-12-15 02:26:07 +02:00
+14 -11
View File
@@ -279,6 +279,20 @@ class ApiDocWriter(object):
ad += '\n.. automodule:: ' + uri + '\n'
ad += '\n.. currentmodule:: ' + uri + '\n'
ad += '.. autosummary::\n\n'
for f in functions:
ad += ' ' + uri + '.' + f + '\n'
ad += '\n'
for c in classes:
ad += ' ' + uri + '.' + c + '\n'
ad += '\n'
for f in functions:
# must NOT exclude from index to keep cross-refs working
full_f = uri + '.' + f
ad += f + '\n'
ad += self.rst_section_levels[2] * len(f) + '\n'
ad += '\n.. autofunction:: ' + full_f + '\n\n'
for c in classes:
ad += '\n:class:`' + c + '`\n' \
+ self.rst_section_levels[2] * \
@@ -290,17 +304,6 @@ class ApiDocWriter(object):
' :show-inheritance:\n' \
'\n' \
' .. automethod:: __init__\n'
ad += '.. autosummary::\n\n'
for f in functions:
ad += ' ' + uri + '.' + f + '\n'
ad += '\n'
for f in functions:
# must NOT exclude from index to keep cross-refs working
full_f = uri + '.' + f
ad += f + '\n'
ad += self.rst_section_levels[2] * len(f) + '\n'
ad += '\n.. autofunction:: ' + full_f + '\n\n'
return ad
def _survives_exclude(self, matchstr, match_type):