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. An :autolink: role is also provided. autosummary directive --------------------- The autosummary directive has the form:: .. autosummary:: :nosignatures: :toctree: generated/ module.function_1 module.function_2 ... and it generates an output table (containing signatures, optionally) ======================== ============================================= module.function_1(args) Summary line from the docstring of function_1 module.function_2(args) Summary line from the docstring ... ======================== ============================================= If the :toctree: option is specified, files matching the function names are inserted to the toctree with the given prefix: generated/module.function_1 generated/module.function_2 ... 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'. :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details.
Unknown Field: copyright | |
Copyright 2007-2022 by the Sphinx team, see AUTHORS. | |
Unknown Field: license | |
BSD, see LICENSE for details. |
Module | generate |
sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
From __init__.py
:
Constant | WELL_KNOWN_ABBREVIATIONS |
Undocumented |
Variable | literal_re |
Undocumented |
Variable | logger |
Undocumented |
Variable | periods_re |
Undocumented |
Class | AutoLink |
Smart linking role. |
Class | Autosummary |
Pretty table containing short signatures and summaries of functions etc. |
Class | autosummary_table |
Undocumented |
Class | autosummary_toc |
Undocumented |
Class | FakeApplication |
Undocumented |
Class | FakeDirective |
Undocumented |
Class | ImportExceptionGroup |
Exceptions raised during importing the target objects. |
Function | _cleanup_signature |
Clean up signature using inspect.signautre() for mangle_signature() |
Function | _import_by_name |
Import a Python object given its full name. |
Function | autosummary_noop |
Undocumented |
Function | autosummary_table_visit_html |
Make the first column of the table non-breaking. |
Function | autosummary_toc_visit_html |
Hide autosummary toctree list in HTML output. |
Function | extract_summary |
Extract summary from docstring. |
Function | get_documenter |
Get an autodoc.Documenter class suitable for documenting the given object. |
Function | get_import_prefixes_from_env |
Obtain current Python import prefixes (for import_by_name ) from document.env |
Function | get_rst_suffix |
Undocumented |
Function | import_by_name |
Import a Python object that has the given name, under one of the prefixes. The first name that succeeds is used. |
Function | import_ivar_by_name |
Import an instance variable that has the given name, under one of the prefixes. The first name that succeeds is used. |
Function | limited_join |
Join a number of strings into one, limiting the length to max_chars. |
Function | mangle_signature |
Reformat a function signature to a more compact form. |
Function | process_autosummary_toc |
Insert items described in autosummary:: to the TOC tree, but do not generate the toctree:: list. |
Function | process_generate_options |
Undocumented |
Function | setup |
Undocumented |
Function | strip_arg_typehint |
Strip a type hint from argument definition. |
Parameters | |
app:Sphinx | Undocumented |
doctree:nodes.document | Undocumented |
Parameters | |
node:autosummary_toc | Undocumented |
Parameters | |
node:autosummary_table | Undocumented |
Get an autodoc.Documenter class suitable for documenting the given object.
obj is the Python object to be documented, and parent is an another Python object (e.g. a module or a class) to which obj belongs to.
Parameters | |
app:Sphinx | Undocumented |
obj:Any | Undocumented |
parent:Any | Undocumented |
Returns | |
Type[ | Undocumented |
Parameters | |
s:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
s:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
sig:str | Undocumented |
max_chars:int | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
doc:List[ | Undocumented |
document:Any | Undocumented |
Returns | |
str | Undocumented |
Join a number of strings into one, limiting the length to max_chars.
If the string overflows this limit, replace the last fitting item by overflow_marker.
Returns: joined_string
Parameters | |
sep:str | Undocumented |
items:List[ | Undocumented |
max_chars:int | Undocumented |
overflow_marker:str | Undocumented |
Returns | |
str | Undocumented |
import_by_name
)
from document.envParameters | |
env:BuildEnvironment | Undocumented |
Returns | |
List[ | Undocumented |
Parameters | |
name:str | Undocumented |
prefixes:List[ | Undocumented |
grouped_exception:bool | Undocumented |
Returns | |
Tuple[ | Undocumented |
Parameters | |
name:str | Undocumented |
grouped_exception:bool | Undocumented |
Returns | |
Tuple[ | Undocumented |
Parameters | |
name:str | Undocumented |
prefixes:List[ | Undocumented |
grouped_exception:bool | Undocumented |
Returns | |
Tuple[ | Undocumented |