Extension to create automatic documentation from code docstrings. Automatically insert docstrings for functions, classes or whole modules into the doctree, thus avoiding duplication between docstrings and documentation for those who like elaborate docstrings.
Module | directive |
No module docstring; 0/1 variable, 0/2 constant, 2/2 functions, 3/3 classes documented |
Module | importer |
Importer utilities for autodoc |
Module | mock |
mock for autodoc |
Module | preserve |
Preserve function defaults. |
Module | type |
Update annotations info of living objects using type_comments. |
Module | typehints |
Generating content for autodoc using typehints |
From __init__.py
:
Class |
|
Specialized Documenter subclass for attributes. |
Class |
|
Specialized Documenter subclass for classes. |
Class |
|
Specialized Documenter subclass for objects on class level (methods, attributes). |
Class |
|
Specialized Documenter subclass for data items. |
Class |
|
No class docstring; 0/6 class variable, 3/3 methods documented |
Class |
|
Specialized Documenter subclass for decorator functions. |
Class |
|
Mixin for FunctionDocumenter and MethodDocumenter to provide the feature of reading the signature from the docstring. |
Class |
|
Mixin for AttributeDocumenter to provide the feature of stripping any function signature from the docstring. |
Class |
|
A Documenter knows how to autodocument a single object type. When registered with the AutoDirective, it will be used to document objects of that type when needed by autodoc. |
Class |
|
Specialized ClassDocumenter subclass for exceptions. |
Class |
|
Specialized Documenter subclass for functions. |
Class |
|
Mixin for DataDocumenter and AttributeDocumenter to provide the feature for supporting GenericAliases. |
Class |
|
Specialized Documenter subclass for methods (normal, static and class). |
Class |
|
Specialized Documenter subclass for modules. |
Class |
|
Specialized Documenter subclass for objects on module level (functions, classes, data/constants). |
Class |
|
Mixin for AttributeDocumenter to provide the feature for supporting non data-descriptors. |
Class |
|
A member of object. |
Class |
|
A dict/attribute hybrid that returns None on nonexisting keys. |
Class |
|
Specialized Documenter subclass for properties. |
Class |
|
Mixin for AttributeDocumenter to provide the feature for supporting runtime instance attributes (that are defined in __init__() methods with doc-comments). |
Class |
|
Mixin for AttributeDocumenter to provide the feature for supporting __slots__. |
Class |
|
Mixin for DataDocumenter to provide the feature for supporting uninitialized (type annotation only) global variables. |
Class |
|
Mixin for AttributeDocumenter to provide the feature for supporting uninitialized instance attributes (PEP-526 styled, annotation only attributes). |
Function | annotation |
Undocumented |
Function | autodoc |
Alternative getattr() for types |
Function | between |
Return a listener that either keeps, or if *exclude* is True excludes, lines between lines that match the *marker* regular expression. If no line matches, the resulting docstring would be empty, so no change will be made unless *keepempty* is true. |
Function | bool |
Used to convert flag options to auto directives. (Instead of directives.flag(), which returns None). |
Function | class |
Used to convert the :class-doc-from: option to autoclass directives. |
Function | cut |
Return a listener that removes the first *pre* and last *post* lines of every docstring. If *what* is a sequence of strings, only docstrings of a type in *what* will be processed. |
Function | exclude |
Used to convert the :exclude-members: option. |
Function | identity |
Undocumented |
Function | inherited |
Used to convert the :inherited-members: option to auto directives. |
Function | member |
Used to convert the :member-order: option to auto directives. |
Function | members |
Used to convert the :members: option to auto directives. |
Function | merge |
Merge :private-members: and :special-members: options to the :members: option. |
Function | setup |
Undocumented |
Constant | ALL |
Undocumented |
Constant | EMPTY |
Undocumented |
Constant | INSTANCEATTR |
Undocumented |
Constant | SLOTSATTR |
Undocumented |
Constant | SUPPRESS |
Undocumented |
Constant | UNINITIALIZED |
Undocumented |
Type Alias |
|
Undocumented |
Variable | logger |
Undocumented |
Variable |
|
Undocumented |
Variable | py |
Undocumented |
Variable | special |
Undocumented |
Class | _ |
A special value for :*-members: that matches to any member. |
Class | _ |
A special value for :exclude-members: that never matches to any member. |
Constant | _CLASS |
Undocumented |
Constant | _METACLASS |
Undocumented |
Merge :private-members: and :special-members: options to the :members: option.
Parameters | |
options:dict | Undocumented |
Return a listener that removes the first *pre* and last *post* lines of every docstring. If *what* is a sequence of strings, only docstrings of a type in *what* will be processed. Use like this (e.g. in the ``setup()`` function of :file:`conf.py`):: from sphinx.ext.autodoc import cut_lines app.connect('autodoc-process-docstring', cut_lines(4, what=['module'])) This can (and should) be used in place of :confval:`automodule_skip_lines`.
Parameters | |
pre:int | Undocumented |
post:int | Undocumented |
what:str|None | Undocumented |
Returns | |
Callable | Undocumented |
Return a listener that either keeps, or if *exclude* is True excludes, lines between lines that match the *marker* regular expression. If no line matches, the resulting docstring would be empty, so no change will be made unless *keepempty* is true. If *what* is a sequence of strings, only docstrings of a type in *what* will be processed.
Parameters | |
marker:str | Undocumented |
what:Sequence[ | Undocumented |
keepempty:bool | Undocumented |
exclude:bool | Undocumented |
Returns | |
Callable | Undocumented |