| 1 |
.. |
| 2 |
Copyright (c) 2021 Pradyun Gedam |
| 3 |
Licensed under Creative Commons Attribution-ShareAlike 4.0 International License |
| 4 |
SPDX-License-Identifier: CC-BY-SA-4.0 |
| 5 |
|
| 6 |
***************** |
| 7 |
API documentation |
| 8 |
***************** |
| 9 |
|
| 10 |
Using Sphinx's ``sphinx.ext.autodoc`` plugin, it is possible to auto-generate documentation of a Python module. |
| 11 |
|
| 12 |
.. tip:: |
| 13 |
Avoid having in-function-signature type annotations with autodoc, |
| 14 |
by setting the following options: |
| 15 |
|
| 16 |
.. code-block:: python |
| 17 |
|
| 18 |
# -- Options for autodoc ---------------------------------------------------- |
| 19 |
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration |
| 20 |
|
| 21 |
# Automatically extract typehints when specified and place them in |
| 22 |
# descriptions of the relevant function/method. |
| 23 |
autodoc_typehints = "description" |
| 24 |
|
| 25 |
# Don't show class signature with the class' name. |
| 26 |
autodoc_class_signature = "separated" |
| 27 |
|
| 28 |
.. automodule:: urllib.parse |
| 29 |
:members: |