Modified the order of API docs page so that table of contents is always

at the top (following #880)
This commit is contained in:
emmanuelle
2014-12-13 13:31:36 +01:00
parent fc667d98d4
commit 5cb2c630a4
+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):