From 33555e5cbc7f4d36e9d64edb31de0b3eb40c2f67 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Tue, 20 Feb 2024 20:21:08 +0100 Subject: [PATCH] docs: Add typehints in both signature and description of API docs (#17815) This way we can document APIs in methods signature only where they are checked by the typing system and we get them also in the param description without having to duplicate in the docstrings (where they are unchecked). Twitter: @cbornet_ --- docs/api_reference/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api_reference/conf.py b/docs/api_reference/conf.py index e993048fc5..36f34a4459 100644 --- a/docs/api_reference/conf.py +++ b/docs/api_reference/conf.py @@ -114,8 +114,8 @@ autodoc_pydantic_field_signature_prefix = "param" autodoc_member_order = "groupwise" autoclass_content = "both" autodoc_typehints_format = "short" +autodoc_typehints = "both" -# autodoc_typehints = "description" # Add any paths that contain templates here, relative to this directory. templates_path = ["templates"]