Skip to content

[Docs] Missing parentheses in TypeIs and TypeGuard documentation #120572

Description

@BlueGlassBlock

Documentation

Current documentation regarding TypeIs's behaviors is inconsistent with that in typing spec.

--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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``).

This issue is also present in documentation of TypeGuard from 3.10 to 3.12.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions