diff options
author | Chase Sterling <chase.sterling@gmail.com> | 2022-02-03 01:50:12 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-02-11 09:48:58 +0100 |
commit | dabb5053761644d06a4decaac7a4edaaa42f4412 (patch) | |
tree | c7f2e2b496d81bf2c9e3215c765274536481e414 /docs | |
parent | [GtkUI] Fix ETA being copied to neighboring empty cells (diff) | |
download | deluge-dabb5053761644d06a4decaac7a4edaaa42f4412.tar.xz deluge-dabb5053761644d06a4decaac7a4edaaa42f4412.zip |
[Core] Document all exported core methods with type hints
Standardize docstrings in core.py to google standard.
Remove type hints in docstrings in favor of the ones in method signatures.
Use function signature type hints in autodoc generated docs.
Change Deferred type hints to strings.
Older versions of twisted (<21.7) don't
support generic Deferred type hinting,
this prevents crashes on those versions.
Closes: https://github.com/deluge-torrent/deluge/pull/359
Diffstat (limited to 'docs')
-rw-r--r-- | docs/requirements.txt | 1 | ||||
-rw-r--r-- | docs/source/conf.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/docs/requirements.txt b/docs/requirements.txt index 18ef4fe47..70739640a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,3 +2,4 @@ sphinx==4.* myst-parser sphinx_rtd_theme sphinxcontrib-spelling==7.3.0 +sphinx-autodoc-typehints diff --git a/docs/source/conf.py b/docs/source/conf.py index f04653e03..9c5853c73 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,6 +48,7 @@ extensions = [ 'sphinx.ext.coverage', 'sphinxcontrib.spelling', 'myst_parser', + 'sphinx_autodoc_typehints', ] napoleon_include_init_with_doc = True |