Skip to content

Commit aa7c21a

Browse files
committed
Typeshed cherry-pick: Ignore mypy errors in Python 2 builtins and typing (#7894) (#12826)
From python/typeshed#7894.
1 parent 644d5f6 commit aa7c21a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

mypy/typeshed/stdlib/@python2/__builtin__.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ class set(MutableSet[_T], Generic[_T]):
711711
def __and__(self, s: AbstractSet[object]) -> set[_T]: ...
712712
def __iand__(self: Self, s: AbstractSet[object]) -> Self: ...
713713
def __or__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
714-
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ...
714+
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc]
715715
@overload
716716
def __sub__(self: set[str], s: AbstractSet[Text | None]) -> set[_T]: ...
717717
@overload
@@ -721,7 +721,7 @@ class set(MutableSet[_T], Generic[_T]):
721721
@overload
722722
def __isub__(self, s: AbstractSet[_T | None]) -> set[_T]: ...
723723
def __xor__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
724-
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ...
724+
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc]
725725
def __le__(self, s: AbstractSet[object]) -> bool: ...
726726
def __lt__(self, s: AbstractSet[object]) -> bool: ...
727727
def __ge__(self, s: AbstractSet[object]) -> bool: ...

mypy/typeshed/stdlib/@python2/builtins.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ class set(MutableSet[_T], Generic[_T]):
711711
def __and__(self, s: AbstractSet[object]) -> set[_T]: ...
712712
def __iand__(self: Self, s: AbstractSet[object]) -> Self: ...
713713
def __or__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
714-
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ...
714+
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc]
715715
@overload
716716
def __sub__(self: set[str], s: AbstractSet[Text | None]) -> set[_T]: ...
717717
@overload
@@ -721,7 +721,7 @@ class set(MutableSet[_T], Generic[_T]):
721721
@overload
722722
def __isub__(self, s: AbstractSet[_T | None]) -> set[_T]: ...
723723
def __xor__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
724-
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ...
724+
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc]
725725
def __le__(self, s: AbstractSet[object]) -> bool: ...
726726
def __lt__(self, s: AbstractSet[object]) -> bool: ...
727727
def __ge__(self, s: AbstractSet[object]) -> bool: ...

mypy/typeshed/stdlib/@python2/typing.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ class MutableSet(AbstractSet[_T], Generic[_T]):
239239
def clear(self) -> None: ...
240240
def pop(self) -> _T: ...
241241
def remove(self, element: _T) -> None: ...
242-
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ...
242+
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc]
243243
def __iand__(self: Self, s: AbstractSet[Any]) -> Self: ...
244-
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ...
244+
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ... # type: ignore[override,misc]
245245
def __isub__(self: Self, s: AbstractSet[Any]) -> Self: ...
246246

247247
class MappingView(object):

0 commit comments

Comments
 (0)