Skip to content

Commit ac823db

Browse files
committed
🐴 ignore some false positive mypy overload-overlap errors
1 parent 6c7255a commit ac823db

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/numpy-stubs/_core/fromnumeric.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def reshape(
208208
copy: bool | None = None,
209209
) -> np.ndarray[tuple[int], np.dtype[_ScalarT]]: ...
210210
@overload # shape: _AnyShape
211-
def reshape(
211+
def reshape( # type: ignore[overload-overlap]
212212
a: _ToArray1_nd[_ScalarT],
213213
/,
214214
shape: _AnyShapeT,
@@ -218,7 +218,7 @@ def reshape(
218218
copy: bool | None = None,
219219
) -> Array[_ScalarT, _AnyShapeT]: ...
220220
@overload # shape: Sequence[index]
221-
def reshape(
221+
def reshape( # type: ignore[overload-overlap]
222222
a: _ToArray1_nd[_ScalarT],
223223
/,
224224
shape: Sequence[CanIndex],
@@ -486,9 +486,9 @@ def searchsorted(
486486
@overload
487487
def resize(a: _ToArray1_nd[_ScalarT], new_shape: CanIndex) -> Array_1d[_ScalarT]: ...
488488
@overload
489-
def resize(a: _ToArray1_nd[_ScalarT], new_shape: _AnyShapeT) -> Array[_ScalarT, _AnyShapeT]: ...
489+
def resize(a: _ToArray1_nd[_ScalarT], new_shape: _AnyShapeT) -> Array[_ScalarT, _AnyShapeT]: ... # type: ignore[overload-overlap]
490490
@overload
491-
def resize(a: _ToArray1_nd[_ScalarT], new_shape: Sequence[CanIndex]) -> Array[_ScalarT]: ...
491+
def resize(a: _ToArray1_nd[_ScalarT], new_shape: Sequence[CanIndex]) -> Array[_ScalarT]: ... # type: ignore[overload-overlap]
492492
@overload
493493
def resize(a: ArrayLike, new_shape: CanIndex) -> Array_1d[Any]: ...
494494
@overload

src/numpy-stubs/_core/shape_base.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def atleast_1d(a0: _Array1T, /) -> _Array1T: ...
3939
@overload
4040
def atleast_1d(a0: _Array1T0, a1: _Array1T1, /) -> tuple[_Array1T0, _Array1T1]: ...
4141
@overload
42-
def atleast_1d(a0: _Array1T, a1: _Array1T, /, *arys: _Array1T) -> tuple[_Array1T, ...]: ...
42+
def atleast_1d(a0: _Array1T, a1: _Array1T, /, *arys: _Array1T) -> tuple[_Array1T, ...]: ... # type: ignore[overload-overlap]
4343
@overload
4444
def atleast_1d(a0: _ArrayLike[_SCT], /) -> NDArray[_SCT]: ...
4545
@overload
@@ -59,7 +59,7 @@ def atleast_2d(a0: _Array2T, /) -> _Array2T: ...
5959
@overload
6060
def atleast_2d(a0: _Array2T0, a1: _Array2T1, /) -> tuple[_Array2T0, _Array2T1]: ...
6161
@overload
62-
def atleast_2d(a0: _Array2T, a1: _Array2T, /, *arys: _Array2T) -> tuple[_Array2T, ...]: ...
62+
def atleast_2d(a0: _Array2T, a1: _Array2T, /, *arys: _Array2T) -> tuple[_Array2T, ...]: ... # type: ignore[overload-overlap]
6363
@overload
6464
def atleast_2d(a0: _ArrayLike[_SCT], /) -> NDArray[_SCT]: ...
6565
@overload
@@ -79,7 +79,7 @@ def atleast_3d(a0: _Array3T, /) -> _Array3T: ...
7979
@overload
8080
def atleast_3d(a0: _Array3T0, a1: _Array3T1, /) -> tuple[_Array3T0, _Array3T1]: ...
8181
@overload
82-
def atleast_3d(a0: _Array3T, a1: _Array3T, /, *arys: _Array3T) -> tuple[_Array3T, ...]: ...
82+
def atleast_3d(a0: _Array3T, a1: _Array3T, /, *arys: _Array3T) -> tuple[_Array3T, ...]: ... # type: ignore[overload-overlap]
8383
@overload
8484
def atleast_3d(a0: _ArrayLike[_SCT], /) -> NDArray[_SCT]: ...
8585
@overload

0 commit comments

Comments
 (0)