[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120575)

gh-120572: add missing parentheses in TypeIs documentation (GH-120573)
(cherry picked from commit 1fa595963e)

Co-authored-by: Nyuan Zhang <blueglassblock@outlook.com>
This commit is contained in:
Miss Islington (bot) 2024-06-16 07:51:29 +02:00 committed by GitHub
parent a19bb261a3
commit d4e1d093d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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