From 9a288ba8ed115ffa237101023ba4b33be62ba466 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 1 Sep 2021 17:37:36 -0400 Subject: [PATCH 1/2] create cross-references in docstring --- doc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/conf.py b/doc/conf.py index 02610d172b..dacf675b45 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -220,6 +220,7 @@ def setup(app): ), "ase": ("https://wiki.fysik.dtu.dk/ase/", None), } +numpydoc_xref_param_type = True # -- Options for HTML output ------------------------------------------------- From 5bfeb3a7a1c310e1a1735584188005df309480b1 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 1 Sep 2021 17:57:58 -0400 Subject: [PATCH 2/2] add typing alias --- doc/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index dacf675b45..dd946fa2e1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -222,6 +222,12 @@ def setup(app): } numpydoc_xref_param_type = True + +numpydoc_xref_aliases = {} +import typing +for typing_type in typing.__all__: + numpydoc_xref_aliases[typing_type] = "typing.%s" % typing_type + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for