mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
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:
+3
-3
@@ -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",)
|
||||
|
||||
Reference in New Issue
Block a user