doctools
Utilities for documenting functions, classes and methods.
Data:
Invariant |
|
Invariant |
Functions:
|
Decorator to appends the docstring from the |
|
Sets the docstring of the |
|
Removes all indentation from the given string. |
|
Sets the docstring of the |
|
Decorator to set the docstring of the |
|
Make proper sphinx links out of double-backticked strings in docstring. |
|
Decorator to prettify the default |
Decorator to make proper sphinx links out of double-backticked strings in the docstring. |
-
_F
= TypeVar(_F, bound=typing.Callable[..., typing.Any]) Type:
TypeVar
Invariant
TypeVar
bound totyping.Callable
[…,typing.Any
].
-
_T
= TypeVar(_T, bound=typing.Type) Type:
TypeVar
Invariant
TypeVar
bound totyping.Type
.
-
append_docstring_from
(original)[source] Decorator to appends the docstring from the
original
function to thetarget
function.This may be useful for subclasses or wrappers that use the same arguments.
Any indentation in either docstring is removed to ensure consistent indentation between the two docstrings. Bear this in mind if additional indentation is used in the docstring.
-
append_doctring_from_another
(target, original)[source] Sets the docstring of the
target
function to that of theoriginal
function.This may be useful for subclasses or wrappers that use the same arguments.
Any indentation in either docstring is removed to ensure consistent indentation between the two docstrings. Bear this in mind if additional indentation is used in the docstring.
-
document_object_from_another
(target, original)[source] Sets the docstring of the
target
function to that of theoriginal
function.This may be useful for subclasses or wrappers that use the same arguments.
-
is_documented_by
(original)[source] Decorator to set the docstring of the
target
function to that of theoriginal
function.This may be useful for subclasses or wrappers that use the same arguments.
-
make_sphinx_links
(input_string, builtins_list=None)[source] Make proper sphinx links out of double-backticked strings in docstring.
i.e.
``str``
becomes:class:`str`
Make sure to include the following in your
conf.py
file for Sphinx:intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
-
prettify_docstrings
(obj)[source] Decorator to prettify the default
object
docstrings for use in Sphinx documentation.New in version 0.8.0.