Skip to content

Commit c1bbdaf

Browse files
committed
🐴 ignore false-positive mypy errors
1 parent df7baba commit c1bbdaf

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/numpy-stubs/__init__.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,11 +1959,11 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
19591959

19601960
#
19611961
@overload
1962-
def __add__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, _ScalarT], /) -> NDArray[_ScalarT]: ...
1962+
def __add__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, _ScalarT], /) -> NDArray[_ScalarT]: ... # type: ignore[overload-overlap]
19631963
@overload
1964-
def __add__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, Any, _ScalarT, _ScalarT2], /) -> NDArray[_ScalarT2]: ...
1964+
def __add__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, Any, _ScalarT, _ScalarT2], /) -> NDArray[_ScalarT2]: ... # type: ignore[overload-overlap]
19651965
@overload
1966-
def __add__(self: NDArray[_ScalarT], x: _nt.MatchND[Any, _nt.PromoteWith[_ScalarT, _ScalarT2]], /) -> NDArray[_ScalarT2]: ...
1966+
def __add__(self: NDArray[_ScalarT], x: _nt.MatchND[Any, _nt.PromoteWith[_ScalarT, _ScalarT2]], /) -> NDArray[_ScalarT2]: ... # type: ignore[overload-overlap]
19671967
@overload
19681968
def __add__(self: NDArray[generic[_AnyItemT]], x: _nt.SequenceND[_AnyItemT], /) -> ndarray[tuple[int, ...], _DTypeT_co]: ...
19691969
@overload
@@ -1979,11 +1979,11 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
19791979

19801980
# keep in sync with __add__
19811981
@overload
1982-
def __radd__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, _ScalarT], /) -> NDArray[_ScalarT]: ...
1982+
def __radd__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, _ScalarT], /) -> NDArray[_ScalarT]: ... # type: ignore[overload-overlap]
19831983
@overload
1984-
def __radd__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, Any, _ScalarT, _ScalarT2], /) -> NDArray[_ScalarT2]: ...
1984+
def __radd__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, Any, _ScalarT, _ScalarT2], /) -> NDArray[_ScalarT2]: ... # type: ignore[overload-overlap]
19851985
@overload
1986-
def __radd__(self: NDArray[_ScalarT], x: _nt.MatchND[Any, _nt.PromoteWith[_ScalarT, _ScalarT2]], /) -> NDArray[_ScalarT2]: ...
1986+
def __radd__(self: NDArray[_ScalarT], x: _nt.MatchND[Any, _nt.PromoteWith[_ScalarT, _ScalarT2]], /) -> NDArray[_ScalarT2]: ... # type: ignore[overload-overlap]
19871987
@overload
19881988
def __radd__(self: NDArray[generic[_AnyItemT]], x: _nt.SequenceND[_AnyItemT], /) -> ndarray[tuple[int, ...], _DTypeT_co]: ...
19891989
@overload
@@ -1998,7 +1998,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
19981998
def __radd__(self: _nt.StringArrayND[_T], x: _nt.ToString_nd[_T] | _nt.ToStr_nd, /) -> _nt.StringArrayND[_T]: ...
19991999

20002000
#
2001-
@overload
2001+
@overload # type: ignore[misc]
20022002
def __iadd__(self: NDArray[_ScalarT], x: _nt.CanCastND[Any, _ScalarT], /) -> ndarray[_ShapeT_co, _DTypeT_co]: ...
20032003
@overload
20042004
def __iadd__(self: NDArray[generic[_AnyItemT]], x: _nt.SequenceND[_AnyItemT], /) -> ndarray[_ShapeT_co, _DTypeT_co]: ...

src/numpy-stubs/ma/core.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class MaskedArray(np.ndarray[_ShapeT_co, _DTypeT_co]):
456456
@override
457457
def __rpow__(self, other: Incomplete, /) -> Incomplete: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
458458
@override
459-
def __iadd__(self, other: Incomplete, /) -> Self: ...
459+
def __iadd__(self, other: Incomplete, /) -> Self: ... # type: ignore[override]
460460
@override
461461
def __isub__(self, other: Incomplete, /) -> Self: ... # type: ignore[override]
462462
@override

0 commit comments

Comments
 (0)