From 4169a14011bd9a55b78c9b202c992fdadddd16ca Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Tue, 6 Jun 2023 10:41:15 +0100 Subject: [PATCH 1/3] typing docs: Make the PEPs list an expandable section, hidden by default --- Doc/library/typing.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index a9ea4b9fee3ad4..bc3b18c1828045 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -59,7 +59,12 @@ Relevant PEPs Since the initial introduction of type hints in :pep:`484` and :pep:`483`, a number of PEPs have modified and enhanced Python's framework for type -annotations. These include: +annotations: + +.. raw:: html + +
+ Click to see the full list of PEPs * :pep:`526`: Syntax for Variable Annotations *Introducing* syntax for annotating variables outside of function @@ -106,6 +111,10 @@ annotations. These include: * :pep:`698`: Adding an override decorator to typing *Introducing* the :func:`@override` decorator +.. raw:: html + +
+ .. _type-aliases: Type aliases From 79a09ff98cee7a941214d993903a0c3e4a1a83b4 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 6 Jun 2023 10:57:48 +0100 Subject: [PATCH 2/3] try to improve the rendering --- Doc/library/typing.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index bc3b18c1828045..84eb95cf4bda90 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -64,7 +64,7 @@ annotations: .. raw:: html
- Click to see the full list of PEPs + Click to see the full list of PEPs * :pep:`526`: Syntax for Variable Annotations *Introducing* syntax for annotating variables outside of function @@ -114,6 +114,7 @@ annotations: .. raw:: html
+
.. _type-aliases: From ba8b0b093d885ab27a7934d04a53d84c90d4c3be Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 6 Jun 2023 14:10:09 +0100 Subject: [PATCH 3/3] Update Doc/library/typing.rst Co-authored-by: Hugo van Kemenade --- Doc/library/typing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 84eb95cf4bda90..147f51b273de94 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -64,7 +64,7 @@ annotations: .. raw:: html
- Click to see the full list of PEPs + The full list of PEPs * :pep:`526`: Syntax for Variable Annotations *Introducing* syntax for annotating variables outside of function