]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120575)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 16 Jun 2024 05:51:29 +0000 (07:51 +0200)
committerGitHub <noreply@github.com>
Sun, 16 Jun 2024 05:51:29 +0000 (05:51 +0000)
gh-120572: add missing parentheses in TypeIs documentation (GH-120573)
(cherry picked from commit 1fa595963ed512b055d2a4faddef5a9e544288ac)

Co-authored-by: Nyuan Zhang <blueglassblock@outlook.com>
Doc/library/typing.rst

index 14dd9f6b26418448df028df8cfd71324b1243e5f..6a369292048a2384322dfd441c529ebc0ef3afd8 100644 (file)
@@ -1454,8 +1454,8 @@ These can be used as types in annotations. They all support subscription using
    to write such functions in a type-safe manner.
 
    If a ``TypeIs`` function is a class or instance method, then the type in
-   ``TypeIs`` maps to the type of the second parameter after ``cls`` or
-   ``self``.
+   ``TypeIs`` maps to the type of the second parameter (after ``cls`` or
+   ``self``).
 
    In short, the form ``def foo(arg: TypeA) -> TypeIs[TypeB]: ...``,
    means that if ``foo(arg)`` returns ``True``, then ``arg`` is an instance