API documentation¶
Using Sphinx’s sphinx.ext.autodoc
plugin, it is possible to auto-generate documentation of a Python module.
Tip
Avoid having in-function-signature type annotations with autodoc, by setting the following options:
# -- Options for autodoc ----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration
# Automatically extract typehints when specified and place them in
# descriptions of the relevant function/method.
autodoc_typehints = "description"
# Don't show class signature with the class' name.
autodoc_class_signature = "separated"
This is a demo module included in the docs in order to exercise autodoc.
- furo._demo_module.show_warning(message, category, filename, lineno, file=None, line=None)[source]¶
Show a warning to the end user.
warnings.showwarning = show_warning
- class furo._demo_module.RandomNumberGenerator(*, seed=4)[source]¶
A random number generator.
- Parameters:
seed (int)
- furo._demo_module.annoying_function_name_length_aa(one, two)[source]¶
Add two numbers as strings.
Because I needed a placeholder function.
- furo._demo_module.annoying_function_name_length_aaa(one, two)[source]¶
Add two numbers as strings.
Because I needed a placeholder function.
C inline signature¶
-
type my_type¶
This works my_type
, but I would like to point
to a pointer of the type (my_type*).