package documentation

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.

Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Module deprecated sphinx.ext.autodoc.deprecated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module directive sphinx.ext.autodoc.directive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module importer sphinx.ext.autodoc.importer ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module mock sphinx.ext.autodoc.mock ~~~~~~~~~~~~~~~~~~~~~~~
Module preserve​_defaults sphinx.ext.autodoc.preserve_defaults ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module type​_comment sphinx.ext.autodoc.type_comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module typehints sphinx.ext.autodoc.typehints ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From __init__.py:

Function between No summary
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.
Constant ALL Undocumented
Constant EMPTY Undocumented
Constant INSTANCEATTR Undocumented
Constant SLOTSATTR Undocumented
Constant SUPPRESS Undocumented
Constant UNINITIALIZED​_ATTR Undocumented
Variable logger Undocumented
Variable ​Method​Descriptor​Type Undocumented
Variable ​Object​Members 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.
Class ​Attribute​Documenter Specialized Documenter subclass for attributes.
Class ​Class​Documenter Specialized Documenter subclass for classes.
Class ​Class​Level​Documenter Specialized Documenter subclass for objects on class level (methods, attributes).
Class ​Data​Documenter Specialized Documenter subclass for data items.
Class ​Data​Documenter​Mixin​Base No class docstring; 0/6 class variable, 3/3 methods documented
Class ​Decorator​Documenter Specialized Documenter subclass for decorator functions.
Class ​Docstring​Signature​Mixin Mixin for FunctionDocumenter and MethodDocumenter to provide the feature of reading the signature from the docstring.
Class ​Docstring​Strip​Signature​Mixin 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 ​Exception​Documenter Specialized ClassDocumenter subclass for exceptions.
Class ​Function​Documenter Specialized Documenter subclass for functions.
Class ​Generic​Alias​Mixin Mixin for DataDocumenter and AttributeDocumenter to provide the feature for supporting GenericAliases.
Class ​Method​Documenter Specialized Documenter subclass for methods (normal, static and class).
Class ​Module​Documenter Specialized Documenter subclass for modules.
Class ​Module​Level​Documenter Specialized Documenter subclass for objects on module level (functions, classes, data/constants).
Class ​New​Type​Attribute​Documenter Specialized Documenter subclass for NewTypes.
Class ​New​Type​Data​Documenter Specialized Documenter subclass for NewTypes.
Class ​New​Type​Mixin Mixin for DataDocumenter and AttributeDocumenter to provide the feature for supporting NewTypes.
Class ​Non​Data​Descriptor​Mixin Mixin for AttributeDocumenter to provide the feature for supporting non data-descriptors.
Class ​Object​Member A member of object.
Class ​Options A dict/attribute hybrid that returns None on nonexisting keys.
Class ​Property​Documenter Specialized Documenter subclass for properties.
Class ​Runtime​Instance​Attribute​Mixin Mixin for AttributeDocumenter to provide the feature for supporting runtime instance attributes (that are defined in __init__() methods with doc-comments).
Class ​Slots​Mixin Mixin for AttributeDocumenter to provide the feature for supporting __slots__.
Class ​Type​Var​Mixin Mixin for DataDocumenter and AttributeDocumenter to provide the feature for supporting TypeVars.
Class ​Uninitialized​Global​Variable​Mixin Mixin for DataDocumenter to provide the feature for supporting uninitialized (type annotation only) global variables.
Class ​Uninitialized​Instance​Attribute​Mixin 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 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 exclude​_members​_option Used to convert the :exclude-members: option.
Function get​_documenters Returns registered Documenter classes
Function identity Undocumented
Function inherited​_members​_option Used to convert the :members: option to auto directives.
Function member​_order​_option Used to convert the :members: option to auto directives.
Function members​_option Used to convert the :members: option to auto directives.
Function members​_set​_option Used to convert the :members: option to auto directives.
Function merge​_members​_option Merge :*-members: option to the :members: option.
Function merge​_special​_members​_option Merge :special-members: option to :members: option.
Function migrate​_autodoc​_member​_order Undocumented
Function setup Undocumented
Constant ​_CLASS​_NEW​_BLACKLIST Undocumented
Constant ​_METACLASS​_CALL​_BLACKLIST Undocumented
logger =

Undocumented

MethodDescriptorType =

Undocumented

py_ext_sig_re =

Undocumented

special_member_re =

Undocumented

def identity(x):

Undocumented

Parameters
x:AnyUndocumented
Returns
AnyUndocumented
ALL =

Undocumented

Value
_All()
EMPTY =

Undocumented

Value
_Empty()
UNINITIALIZED_ATTR =

Undocumented

Value
object()
INSTANCEATTR =

Undocumented

Value
object()
SLOTSATTR =

Undocumented

Value
object()
def members_option(arg):
Used to convert the :members: option to auto directives.
Parameters
arg:AnyUndocumented
Returns
Union[object, List[str]]Undocumented
def members_set_option(arg):
Used to convert the :members: option to auto directives.
Parameters
arg:AnyUndocumented
Returns
Union[object, Set[str]]Undocumented
def exclude_members_option(arg):
Used to convert the :exclude-members: option.
Parameters
arg:AnyUndocumented
Returns
Union[object, Set[str]]Undocumented
def inherited_members_option(arg):
Used to convert the :members: option to auto directives.
Parameters
arg:AnyUndocumented
Returns
Union[object, Set[str]]Undocumented
def member_order_option(arg):
Used to convert the :members: option to auto directives.
Parameters
arg:AnyUndocumented
Returns
Optional[str]Undocumented
def class_doc_from_option(arg):
Used to convert the :class-doc-from: option to autoclass directives.
Parameters
arg:AnyUndocumented
Returns
Optional[str]Undocumented
SUPPRESS =

Undocumented

Value
object()
def annotation_option(arg):

Undocumented

Parameters
arg:AnyUndocumented
Returns
AnyUndocumented
def bool_option(arg):
Used to convert flag options to auto directives. (Instead of directives.flag(), which returns None).
Parameters
arg:AnyUndocumented
Returns
boolUndocumented
def merge_special_members_option(options):
Merge :special-members: option to :members: option.
Parameters
options:DictUndocumented
def merge_members_option(options):
Merge :*-members: option to the :members: option.
Parameters
options:DictUndocumented
def cut_lines(pre, post=0, what=None):

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:strUndocumented
Returns
CallableUndocumented
def between(marker, what=None, keepempty=False, exclude=False):

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]Undocumented
keepempty:boolUndocumented
exclude:boolUndocumented
Returns
CallableUndocumented
ObjectMembers =

Undocumented

_METACLASS_CALL_BLACKLIST: list[str] =

Undocumented

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

Undocumented

Value
['typing.Generic.__new__']
def get_documenters(app):
Returns registered Documenter classes
Parameters
app:SphinxUndocumented
Returns
Dict[str, Type[Documenter]]Undocumented
def autodoc_attrgetter(app, obj, name, *defargs):
Alternative getattr() for types
Parameters
app:SphinxUndocumented
obj:AnyUndocumented
name:strUndocumented
*defargs:AnyUndocumented
Returns
AnyUndocumented
def migrate_autodoc_member_order(app, config):

Undocumented

Parameters
app:SphinxUndocumented
config:ConfigUndocumented
def setup(app):

Undocumented

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