-
Notifications
You must be signed in to change notification settings - Fork 296
/
api.rst
37 lines (26 loc) · 1.13 KB
/
api.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
..
Copyright (c) 2021 Pradyun Gedam
Licensed under Creative Commons Attribution-ShareAlike 4.0 International License
SPDX-License-Identifier: CC-BY-SA-4.0
*****************
API documentation
*****************
Using Sphinx's :any:`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:
.. code-block:: python
# -- 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"
.. automodule:: furo._demo_module
:members:
C inline signature
------------------
.. c:type:: my_type
This works :c:type:`my_type`, but I would like to point
to a pointer of the type (:c:expr:`my_type *`).