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`.
This commit is contained in:
Hunter Hogan
2025-07-11 17:55:46 -05:00
committed by GitHub
parent 844e132d1e
commit 1880490289
+3 -3
View File
@@ -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",)