From 5ed7305a18479e557898362854861ac54fab9605 Mon Sep 17 00:00:00 2001 From: Michael Wayne Goodman Date: Thu, 18 Apr 2019 15:41:47 +0800 Subject: [PATCH] Let Sphinx use type hints for signatures Part of #212 --- docs/conf.py | 1 + setup.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 2be46b07..7a4aea42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,6 +47,7 @@ 'sphinx.ext.viewcode', 'sphinx.ext.githubpages', 'sphinx.ext.napoleon', + 'sphinx_autodoc_typehints', ] # Add any paths that contain templates here, relative to this directory. diff --git a/setup.py b/setup.py index 0b51e440..645394b7 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,8 @@ # thanks: https://snarky.ca/clarifying-pep-518/ docs_require = [ 'sphinx', - 'sphinx-rtd-theme' + 'sphinx-rtd-theme', + 'sphinx_autodoc_typehints' ] tests_require = [ 'pytest'