From 617d2aaf57be50d4fada11dff87df6f6ef7f9e44 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 18 Apr 2022 17:20:49 +0100 Subject: [PATCH] Fix crash when running mypy master against typeshed master (#7660) --- stdlib/builtins.pyi | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 316bd3af7..bf1e6cde2 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -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,