From 37fb21afe937be9da98446557244f3de5424ebf8 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Fri, 20 May 2022 16:50:51 +0100 Subject: [PATCH] Typeshed cherry-pick: Ignore mypy errors in Python 2 builtins and typing (#7894) (#12826) From python/typeshed#7894. --- mypy/typeshed/stdlib/@python2/__builtin__.pyi | 4 ++-- mypy/typeshed/stdlib/@python2/builtins.pyi | 4 ++-- mypy/typeshed/stdlib/@python2/typing.pyi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mypy/typeshed/stdlib/@python2/__builtin__.pyi b/mypy/typeshed/stdlib/@python2/__builtin__.pyi index d936e08b8266..4ede9dc9d8bd 100644 --- a/mypy/typeshed/stdlib/@python2/__builtin__.pyi +++ b/mypy/typeshed/stdlib/@python2/__builtin__.pyi @@ -711,7 +711,7 @@ class set(MutableSet[_T], Generic[_T]): def __and__(self, s: AbstractSet[object]) -> set[_T]: ... def __iand__(self: Self, s: AbstractSet[object]) -> Self: ... def __or__(self, s: AbstractSet[_S]) -> set[_T | _S]: ... - def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... + def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc] @overload def __sub__(self: set[str], s: AbstractSet[Text | None]) -> set[_T]: ... @overload @@ -721,7 +721,7 @@ class set(MutableSet[_T], Generic[_T]): @overload def __isub__(self, s: AbstractSet[_T | None]) -> set[_T]: ... def __xor__(self, s: AbstractSet[_S]) -> set[_T | _S]: ... - def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... + def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc] def __le__(self, s: AbstractSet[object]) -> bool: ... def __lt__(self, s: AbstractSet[object]) -> bool: ... def __ge__(self, s: AbstractSet[object]) -> bool: ... diff --git a/mypy/typeshed/stdlib/@python2/builtins.pyi b/mypy/typeshed/stdlib/@python2/builtins.pyi index d936e08b8266..4ede9dc9d8bd 100644 --- a/mypy/typeshed/stdlib/@python2/builtins.pyi +++ b/mypy/typeshed/stdlib/@python2/builtins.pyi @@ -711,7 +711,7 @@ class set(MutableSet[_T], Generic[_T]): def __and__(self, s: AbstractSet[object]) -> set[_T]: ... def __iand__(self: Self, s: AbstractSet[object]) -> Self: ... def __or__(self, s: AbstractSet[_S]) -> set[_T | _S]: ... - def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... + def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc] @overload def __sub__(self: set[str], s: AbstractSet[Text | None]) -> set[_T]: ... @overload @@ -721,7 +721,7 @@ class set(MutableSet[_T], Generic[_T]): @overload def __isub__(self, s: AbstractSet[_T | None]) -> set[_T]: ... def __xor__(self, s: AbstractSet[_S]) -> set[_T | _S]: ... - def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... + def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc] def __le__(self, s: AbstractSet[object]) -> bool: ... def __lt__(self, s: AbstractSet[object]) -> bool: ... def __ge__(self, s: AbstractSet[object]) -> bool: ... diff --git a/mypy/typeshed/stdlib/@python2/typing.pyi b/mypy/typeshed/stdlib/@python2/typing.pyi index affa82c825a2..d1c9ae574e98 100644 --- a/mypy/typeshed/stdlib/@python2/typing.pyi +++ b/mypy/typeshed/stdlib/@python2/typing.pyi @@ -239,9 +239,9 @@ class MutableSet(AbstractSet[_T], Generic[_T]): def clear(self) -> None: ... def pop(self) -> _T: ... def remove(self, element: _T) -> None: ... - def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... + def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc] def __iand__(self: Self, s: AbstractSet[Any]) -> Self: ... - def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... + def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc] def __isub__(self: Self, s: AbstractSet[Any]) -> Self: ... class MappingView(object):