From b87ebc5375365a7db6e3607ab3500147000e838f Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Fri, 28 Jan 2022 08:51:22 +0100 Subject: [PATCH] Don't use a literal for TYPE_CHECKING (#7062) Partly addresses #7061 --- stdlib/@python2/typing.pyi | 2 +- stdlib/typing.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/@python2/typing.pyi b/stdlib/@python2/typing.pyi index e27220492..95df82a2a 100644 --- a/stdlib/@python2/typing.pyi +++ b/stdlib/@python2/typing.pyi @@ -304,7 +304,7 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): Text = unicode -TYPE_CHECKING: Literal[True] +TYPE_CHECKING: bool class IO(Iterator[AnyStr], Generic[AnyStr]): # TODO detach diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index 483edf146..df610291c 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -502,7 +502,7 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): Text = str -TYPE_CHECKING: _Literal[True] +TYPE_CHECKING: bool # In stubs, the arguments of the IO class are marked as positional-only. # This differs from runtime, but better reflects the fact that in reality