Skip to content

Commit 1880490

Browse files
authored
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`.
1 parent 844e132 commit 1880490

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/ast.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,11 +1503,11 @@ if sys.version_info >= (3, 10):
15031503

15041504
class MatchSingleton(pattern):
15051505
__match_args__ = ("value",)
1506-
value: Literal[True, False] | None
1507-
def __init__(self, value: Literal[True, False] | None, **kwargs: Unpack[_Attributes[int]]) -> None: ...
1506+
value: bool | None
1507+
def __init__(self, value: bool | None, **kwargs: Unpack[_Attributes[int]]) -> None: ...
15081508

15091509
if sys.version_info >= (3, 14):
1510-
def __replace__(self, *, value: Literal[True, False] | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1510+
def __replace__(self, *, value: bool | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
15111511

15121512
class MatchSequence(pattern):
15131513
__match_args__ = ("patterns",)

0 commit comments

Comments
 (0)