Skip to content

Commit

Permalink
Ignore mypy errors in Python 2 builtins and typing
Browse files Browse the repository at this point in the history
Similar errors are already ignored in Python 3 stubs. The
errors break Python 2 tests of mypy.

See python#7367 (comment)
for context.
  • Loading branch information
JukkaL committed May 20, 2022
1 parent adf48f1 commit 0c0b014
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions stdlib/@python2/__builtin__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/@python2/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/@python2/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0c0b014

Please sign in to comment.