From 9ceacb9c66a602639e4e3d395ec4a851be5a88e2 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 15 Nov 2023 21:25:41 +0800 Subject: [PATCH] Use the sphinx-autodoc-typehints extension --- .github/workflows/ci_docs.yml | 1 + ci/requirements/docs.yml | 1 + doc/conf.py | 1 + environment.yml | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index f723fddce4a..8adb71356e2 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -93,6 +93,7 @@ jobs: myst-parser panel sphinx + sphinx-autodoc-typehints sphinx-copybutton sphinx-design sphinx-gallery diff --git a/ci/requirements/docs.yml b/ci/requirements/docs.yml index da384363261..138f6589e31 100644 --- a/ci/requirements/docs.yml +++ b/ci/requirements/docs.yml @@ -24,6 +24,7 @@ dependencies: - myst-parser - panel - sphinx + - sphinx-autodoc-typehints - sphinx-copybutton - sphinx-design - sphinx-gallery diff --git a/doc/conf.py b/doc/conf.py index bb7114e7ccc..14bb38dd2ce 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -28,6 +28,7 @@ "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", + "sphinx_autodoc_typehints", "sphinx_copybutton", "sphinx_design", "sphinx_gallery.gen_gallery", diff --git a/environment.yml b/environment.yml index 73b45304436..a455123e0f8 100644 --- a/environment.yml +++ b/environment.yml @@ -37,7 +37,8 @@ dependencies: # Dev dependencies (building documentation) - myst-parser - panel - - sphinx + - sphinx>=3.0 + - sphinx-autodoc-typehints - sphinx-copybutton - sphinx-design - sphinx-gallery