]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Typing docs: normalize some indents in code examples (GH-120912) (#120916)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 23 Jun 2024 16:23:01 +0000 (18:23 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Jun 2024 16:23:01 +0000 (17:23 +0100)
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
Doc/library/typing.rst

index 3d75573c13372095479b365ab5517ab1da830217..86c4dc303c300e2abaa4d341adbe94329e9eeea0 100644 (file)
@@ -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
@@ -1749,8 +1750,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)