From bad2fea551d7a98a75bf8150d8799b0a36d6e787 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 8 Jun 2021 13:25:41 +0200 Subject: [PATCH] Use Literal for MatchSingleton (#5590) --- stdlib/_ast.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/_ast.pyi b/stdlib/_ast.pyi index 2d0d92d83..eee5b55f0 100644 --- a/stdlib/_ast.pyi +++ b/stdlib/_ast.pyi @@ -1,6 +1,7 @@ import sys import typing from typing import Any, ClassVar, Optional +from typing_extensions import Literal PyCF_ONLY_AST: int if sys.version_info >= (3, 8): @@ -390,7 +391,7 @@ if sys.version_info >= (3, 10): class MatchValue(pattern): value: expr class MatchSingleton(pattern): - value: Optional[bool] + value: Literal[True, False, None] class MatchSequence(pattern): patterns: typing.List[pattern] class MatchStar(pattern):