summaryrefslogtreecommitdiff
path: root/sphinx/ext/autosummary/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/autosummary/__init__.py')
-rw-r--r--sphinx/ext/autosummary/__init__.py70
1 files changed, 32 insertions, 38 deletions
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py
index b2d8db069..c72ee680d 100644
--- a/sphinx/ext/autosummary/__init__.py
+++ b/sphinx/ext/autosummary/__init__.py
@@ -1,55 +1,49 @@
-"""
- sphinx.ext.autosummary
- ~~~~~~~~~~~~~~~~~~~~~~
-
- Sphinx extension that adds an autosummary:: directive, which can be
- used to generate function/method/attribute/etc. summary lists, similar
- to those output eg. by Epydoc and other API doc generation tools.
+"""Extension that adds an autosummary:: directive.
- An :autolink: role is also provided.
+The directive can be used to generate function/method/attribute/etc. summary
+lists, similar to those output eg. by Epydoc and other API doc generation tools.
- autosummary directive
- ---------------------
+An :autolink: role is also provided.
- The autosummary directive has the form::
+autosummary directive
+---------------------
- .. autosummary::
- :nosignatures:
- :toctree: generated/
+The autosummary directive has the form::
- module.function_1
- module.function_2
- ...
+ .. autosummary::
+ :nosignatures:
+ :toctree: generated/
- and it generates an output table (containing signatures, optionally)
+ module.function_1
+ module.function_2
+ ...
- ======================== =============================================
- module.function_1(args) Summary line from the docstring of function_1
- module.function_2(args) Summary line from the docstring
- ...
- ======================== =============================================
+and it generates an output table (containing signatures, optionally)
- If the :toctree: option is specified, files matching the function names
- are inserted to the toctree with the given prefix:
+ ======================== =============================================
+ module.function_1(args) Summary line from the docstring of function_1
+ module.function_2(args) Summary line from the docstring
+ ...
+ ======================== =============================================
- generated/module.function_1
- generated/module.function_2
- ...
+If the :toctree: option is specified, files matching the function names
+are inserted to the toctree with the given prefix:
- Note: The file names contain the module:: or currentmodule:: prefixes.
+ generated/module.function_1
+ generated/module.function_2
+ ...
- .. seealso:: autosummary_generate.py
+Note: The file names contain the module:: or currentmodule:: prefixes.
+.. seealso:: autosummary_generate.py
- autolink role
- -------------
- The autolink role functions as ``:obj:`` when the name referred can be
- resolved to a Python object, and otherwise it becomes simple emphasis.
- This can be used as the default role to make links 'smart'.
+autolink role
+-------------
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
+The autolink role functions as ``:obj:`` when the name referred can be
+resolved to a Python object, and otherwise it becomes simple emphasis.
+This can be used as the default role to make links 'smart'.
"""
import inspect
@@ -417,7 +411,7 @@ class Autosummary(SphinxDirective):
table_spec['spec'] = r'\X{1}{2}\X{1}{2}'
table = autosummary_table('')
- real_table = nodes.table('', classes=['longtable'])
+ real_table = nodes.table('', classes=['autosummary longtable'])
table.append(real_table)
group = nodes.tgroup('', cols=2)
real_table.append(group)