]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Typing docs: normalize some indents in code examples (#120912)
authorNyakku Shigure <sigure.qaq@gmail.com>
Sun, 23 Jun 2024 16:15:12 +0000 (00:15 +0800)
committerGitHub <noreply@github.com>
Sun, 23 Jun 2024 16:15:12 +0000 (16:15 +0000)
Doc/library/typing.rst

index bf0ff9bd348553ad01ddbd7c597b55f83e1610ee..07b6e342e09195d4b9652997e61abacb21e3a21d 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
@@ -1871,8 +1872,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)