pytools.api.doc#

Tools for validating API documentation including docstrings and type hints.

Classes#

APIDefinition

A reference to the definition of an API element, e.g., a module, class, or function.

DocTest

A test to be run on the documentation of all API elements, including docstrings and type hints.

FunctionDefinition

A reference to a Python function definition.

HasDocstring

Test that the definition's docstring exists and is not empty.

HasMatchingParameterDoc

Check if parameters match between a callable's signature and its docstring.

HasTypeHints

Check if the given function is fully type hinted.

HasWellFormedDocstring

Check if the given element has a well-formed docstring.

ModuleDefinition

A reference to a Python module definition.

NamedElementDefinition

A reference to a Python class or function definition.