mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-17 11:32:45 +08:00
Modified the order of API docs page so that table of contents is always
at the top (following #880)
This commit is contained in:
+14
-11
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user