Fix crash when running mypy master against typeshed master (#7660)

This commit is contained in:
Alex Waygood
2022-04-18 17:20:49 +01:00
committed by GitHub
parent eafc23ddb8
commit 617d2aaf57

View File

@@ -22,22 +22,11 @@ from _typeshed import (
SupportsTrunc,
SupportsWrite,
)
from collections.abc import (
Awaitable,
Callable,
Iterable,
Iterator,
Mapping,
MutableMapping,
MutableSet,
Reversible,
Set as AbstractSet,
Sized,
)
from collections.abc import Awaitable, Callable, Iterable, Iterator, MutableSet, Reversible, Set as AbstractSet, Sized
from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper
from types import CodeType, TracebackType, _Cell
# mypy crashes if any of {ByteString, Sequence, MutableSequence} are imported from collections.abc in builtins.pyi
# mypy crashes if any of {ByteString, Sequence, MutableSequence, Mapping, MutableMapping} are imported from collections.abc in builtins.pyi
from typing import ( # noqa: Y027
IO,
Any,
@@ -45,6 +34,8 @@ from typing import ( # noqa: Y027
ByteString,
ClassVar,
Generic,
Mapping,
MutableMapping,
MutableSequence,
NoReturn,
Protocol,