Don't use a literal for TYPE_CHECKING (#7062)

Partly addresses #7061
This commit is contained in:
Sebastian Rittau
2022-01-28 08:51:22 +01:00
committed by GitHub
parent 40f5fcc82f
commit b87ebc5375
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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