From 610646d0b970c3b5c92bf2b01ead5971c7a3cc61 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Sun, 23 Jun 2024 23:29:33 +0800 Subject: [PATCH 1/2] docs: fix wrong indentation in `TypeVarTuple` example --- Doc/library/typing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index bf0ff9bd348553..8704b56c4ad1d0 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1871,8 +1871,8 @@ without the dedicated syntax, as documented below. of ``*args``:: def call_soon[*Ts]( - callback: Callable[[*Ts], None], - *args: *Ts + callback: Callable[[*Ts], None], + *args: *Ts ) -> None: ... callback(*args) From 32918a2861ee255748ed7b147294439eb96ee0be Mon Sep 17 00:00:00 2001 From: SigureMo Date: Sun, 23 Jun 2024 23:59:33 +0800 Subject: [PATCH 2/2] fix another example --- Doc/library/typing.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 8704b56c4ad1d0..07b6e342e09195 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -97,8 +97,9 @@ Type aliases are useful for simplifying complex type signatures. For example:: # The static type checker will treat the previous type signature as # being exactly equivalent to this one. def broadcast_message( - message: str, - servers: Sequence[tuple[tuple[str, int], dict[str, str]]]) -> None: + message: str, + servers: Sequence[tuple[tuple[str, int], dict[str, str]]] + ) -> None: ... The :keyword:`type` statement is new in Python 3.12. For backwards