.. _f-sphinxautosignature: module ``sphinxext.sphinx_autosignature`` ========================================= .. inheritance-diagram:: pyquickhelper.sphinxext.sphinx_autosignature Short summary +++++++++++++ module ``pyquickhelper.sphinxext.sphinx_autosignature`` Defines a :epkg:`sphinx` extension to describe a function, inspired from `autofunction `_ and `AutoDirective `_. :githublink:`%|py|8` Classes +++++++ +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | class | truncated documentation | +=======================================================================================================+=================================================================================================+ | :class:`autosignature_node ` | Defines *autosignature* node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :class:`AutoSignatureDirective ` | This directive displays a shorter signature than :epkg:`sphinx.ext.autodoc`. Available options: | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ Functions +++++++++ +----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +================================================================================================================+=================================================================================================================+ | :func:`depart_autosignature_node ` | What to do when leaving a node :class:`autosignature_node`. | +----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :func:`enumerate_cleaned_signature ` | Removes annotation from a signature extracted with :func:`enumerate_extract_signature`. | +----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :func:`enumerate_extract_signature ` | Looks for substring like the following and clean the signature to be able to use function *_signature_fromstr*. | +----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :func:`setup ` | Create a new directive called *autosignature* which displays the signature of the function. | +----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :func:`visit_autosignature_node ` | What to do when visiting a node :class:`autosignature_node`. | +----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +---------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ | property | truncated documentation | +=============================================================================================+===================================================================+ | :meth:`document ` | Return the `document` root node of the tree containing this Node. | +---------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ Static Methods ++++++++++++++ +-------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+ | staticmethod | truncated documentation | +=================================================================================================+===================================================================================+ | :meth:`reformat ` | Formats the number of spaces in front every line to be equal to a specific value. | +-------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ | method | truncated documentation | +===========================================================================================================================+===========================================================+ | :meth:`build_members ` | Extracts methods of a class and document them. | +---------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`build_parameters_list ` | Builds the list of parameters. | +---------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`build_summary ` | Extracts the part of the docstring before the parameters. | +---------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`run ` | | +---------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyquickhelper.sphinxext.sphinx_autosignature :members: :special-members: __init__ :show-inheritance: