From 18804902895eac182d3f0c244d274bcaf00fc04f Mon Sep 17 00:00:00 2001 From: Hunter Hogan Date: Fri, 11 Jul 2025 17:55:46 -0500 Subject: [PATCH] Change ast.MatchSingleton.value from `Literal[True, False]` to `bool` (#14400) This is the only annotation in typeshed that uses `Literal[True, False]`. The most similar annotations are `Literal[True, 1]`. 371 annotations are `bool | None`. --- stdlib/ast.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/ast.pyi b/stdlib/ast.pyi index 33019bc2c..fcd6e8b01 100644 --- a/stdlib/ast.pyi +++ b/stdlib/ast.pyi @@ -1503,11 +1503,11 @@ if sys.version_info >= (3, 10): class MatchSingleton(pattern): __match_args__ = ("value",) - value: Literal[True, False] | None - def __init__(self, value: Literal[True, False] | None, **kwargs: Unpack[_Attributes[int]]) -> None: ... + value: bool | None + def __init__(self, value: bool | None, **kwargs: Unpack[_Attributes[int]]) -> None: ... if sys.version_info >= (3, 14): - def __replace__(self, *, value: Literal[True, False] | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... + def __replace__(self, *, value: bool | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... class MatchSequence(pattern): __match_args__ = ("patterns",)