package documentation

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_defaults Preserve function defaults.
Module type_comment Update annotations info of living objects using type_comments.
Module typehints Generating content for autodoc using typehints

From __init__.py:

Class AttributeDocumenter Specialized Documenter subclass for attributes.
Class ClassDocumenter Specialized Documenter subclass for classes.
Class ClassLevelDocumenter Specialized Documenter subclass for objects on class level (methods, attributes).
Class DataDocumenter Specialized Documenter subclass for data items.
Class DataDocumenterMixinBase No class docstring; 0/6 class variable, 3/3 methods documented
Class DecoratorDocumenter Specialized Documenter subclass for decorator functions.
Class DocstringSignatureMixin Mixin for FunctionDocumenter and MethodDocumenter to provide the feature of reading the signature from the docstring.
Class DocstringStripSignatureMixin Mixin for AttributeDocumenter to provide the feature of stripping any function signature from the docstring.
Class Documenter 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 ExceptionDocumenter Specialized ClassDocumenter subclass for exceptions.
Class FunctionDocumenter Specialized Documenter subclass for functions.
Class GenericAliasMixin Mixin for DataDocumenter and AttributeDocumenter to provide the feature for supporting GenericAliases.
Class MethodDocumenter Specialized Documenter subclass for methods (normal, static and class).
Class ModuleDocumenter Specialized Documenter subclass for modules.
Class ModuleLevelDocumenter Specialized Documenter subclass for objects on module level (functions, classes, data/constants).
Class NonDataDescriptorMixin Mixin for AttributeDocumenter to provide the feature for supporting non data-descriptors.
Class ObjectMember A member of object.
Class Options A dict/attribute hybrid that returns None on nonexisting keys.
Class PropertyDocumenter Specialized Documenter subclass for properties.
Class RuntimeInstanceAttributeMixin Mixin for AttributeDocumenter to provide the feature for supporting runtime instance attributes (that are defined in __init__() methods with doc-comments).
Class SlotsMixin Mixin for AttributeDocumenter to provide the feature for supporting __slots__.
Class UninitializedGlobalVariableMixin Mixin for DataDocumenter to provide the feature for supporting uninitialized (type annotation only) global variables.
Class UninitializedInstanceAttributeMixin Mixin for AttributeDocumenter to provide the feature for supporting uninitialized instance attributes (PEP-526 styled, annotation only attributes).
Function annotation_option Undocumented
Function autodoc_attrgetter 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_option Used to convert flag options to auto directives. (Instead of directives.flag(), which returns None).
Function class_doc_from_option Used to convert the :class-doc-from: option to autoclass directives.
Function cut_lines 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_members_option Used to convert the :exclude-members: option.
Function identity Undocumented
Function inherited_members_option Used to convert the :inherited-members: option to auto directives.
Function member_order_option Used to convert the :member-order: option to auto directives.
Function members_option Used to convert the :members: option to auto directives.
Function merge_members_option 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_ATTR Undocumented
Type Alias ObjectMembers Undocumented
Variable logger Undocumented
Variable MethodDescriptorType Undocumented
Variable py_ext_sig_re Undocumented
Variable special_member_re Undocumented
Class _All A special value for :*-members: that matches to any member.
Class _Empty A special value for :exclude-members: that never matches to any member.
Constant _CLASS_NEW_BLACKLIST Undocumented
Constant _METACLASS_CALL_BLACKLIST Undocumented

Undocumented

MethodDescriptorType = (source)

Undocumented

py_ext_sig_re = (source)

Undocumented

special_member_re = (source)

Undocumented

def identity(x): (source)

Undocumented

Parameters
x:AnyUndocumented
Returns
AnyUndocumented

Undocumented

Value
_All()

Undocumented

Value
_Empty()
UNINITIALIZED_ATTR = (source)

Undocumented

Value
object()
INSTANCEATTR = (source)

Undocumented

Value
object()
SLOTSATTR = (source)

Undocumented

Value
object()
def members_option(arg): (source)

Used to convert the :members: option to auto directives.

Parameters
arg:AnyUndocumented
Returns
object|list[str]Undocumented
def exclude_members_option(arg): (source)

Used to convert the :exclude-members: option.

Parameters
arg:AnyUndocumented
Returns
object|set[str]Undocumented
def inherited_members_option(arg): (source)

Used to convert the :inherited-members: option to auto directives.

Parameters
arg:AnyUndocumented
Returns
set[str]Undocumented
def member_order_option(arg): (source)

Used to convert the :member-order: option to auto directives.

Parameters
arg:AnyUndocumented
Returns
str|NoneUndocumented
def class_doc_from_option(arg): (source)

Used to convert the :class-doc-from: option to autoclass directives.

Parameters
arg:AnyUndocumented
Returns
str|NoneUndocumented
SUPPRESS = (source)

Undocumented

Value
object()
def annotation_option(arg): (source)

Undocumented

Parameters
arg:AnyUndocumented
Returns
AnyUndocumented
def bool_option(arg): (source)

Used to convert flag options to auto directives. (Instead of directives.flag(), which returns None).

Parameters
arg:AnyUndocumented
Returns
boolUndocumented
def merge_members_option(options): (source)

Merge :private-members: and :special-members: options to the :members: option.

Parameters
options:dictUndocumented
def cut_lines(pre, post=0, what=None): (source)

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:intUndocumented
post:intUndocumented
what:str|NoneUndocumented
Returns
CallableUndocumented
def between(marker, what=None, keepempty=False, exclude=False): (source)

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:strUndocumented
what:Sequence[str]|NoneUndocumented
keepempty:boolUndocumented
exclude:boolUndocumented
Returns
CallableUndocumented
ObjectMembers = (source)

Undocumented

Value
Union[List[ObjectMember], List[Tuple[str, Any]]]
_METACLASS_CALL_BLACKLIST: list[str] = (source)

Undocumented

Value
['enum.EnumMeta.__call__']
_CLASS_NEW_BLACKLIST: list[str] = (source)

Undocumented

Value
['typing.Generic.__new__']
def autodoc_attrgetter(app, obj, name, *defargs): (source)

Alternative getattr() for types

Parameters
app:SphinxUndocumented
obj:AnyUndocumented
name:strUndocumented
*defargs:AnyUndocumented
Returns
AnyUndocumented
def setup(app): (source)

Undocumented

Parameters
app:SphinxUndocumented
Returns
dict[str, Any]Undocumented