Skip to content

Commit 1efda5f

Browse files
committed
🐴 remove # type: ignores for now-resolved mypy false positive errors
1 parent b1d7f1d commit 1efda5f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/numpy-stubs/@test/static/accept/testing.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ assert_type(np.testing.clear_and_catch_warnings.modules, set[types.ModuleType])
4343

4444
with np.testing.clear_and_catch_warnings(True) as c1:
4545
assert_type(c1, list[warnings.WarningMessage])
46-
with np.testing.clear_and_catch_warnings() as c2: # type: ignore[var-annotated]
46+
with np.testing.clear_and_catch_warnings() as c2:
4747
assert_type(c2, None)
4848

4949
assert_type(np.testing.suppress_warnings("once"), np.testing.suppress_warnings)

src/numpy-stubs/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4785,7 +4785,7 @@ class complex64(complexfloating):
47854785

47864786
csingle = complex64
47874787

4788-
class complex128(complexfloating, complex): # type: ignore[misc]
4788+
class complex128(complexfloating, complex):
47894789
#
47904790
@overload
47914791
def __new__(cls, real: _ConvertibleToComplex | None = 0, /) -> Self: ...

src/numpy-stubs/ma/core.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ class MaskedArray(np.ndarray[_ShapeT_co, _DTypeT_co]):
624624

625625
#
626626
@override
627-
def ptp( # type: ignore[override] # pyright: ignore[reportIncompatibleVariableOverride]
627+
def ptp( # pyright: ignore[reportIncompatibleVariableOverride]
628628
self, axis: Incomplete = ..., out: Incomplete = ..., fill_value: Incomplete = ..., keepdims: Incomplete = ...
629629
) -> Incomplete: ...
630630

src/numpy-stubs/matrixlib/defmatrix.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class matrix(np.ndarray[_ShapeT_co, _DTypeT_co]):
177177
def argmin(self, /, axis: _ToAxis | None = None, *, out: _ArrayT) -> _ArrayT: ... # pyright: ignore[reportIncompatibleMethodOverride]
178178

179179
#
180-
@overload # type: ignore[override]
180+
@overload
181181
def ptp(self: _nt.Array[_ScalarT], /, axis: None = None, out: None = None) -> _ScalarT: ...
182182
@overload
183183
def ptp(self, /, axis: _ToAxis, out: None = None) -> matrix[_nt.Rank2, _DTypeT_co]: ...

src/numpy-stubs/testing/_private/utils.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class KnownFailureException(Exception): ...
129129
class IgnoreException(Exception): ...
130130

131131
# NOTE: `warnings.catch_warnings` is incorrectly defined as invariant in typeshed
132-
class clear_and_catch_warnings(warnings.catch_warnings[_W_co], Generic[_W_co]): # type: ignore[type-var]
132+
class clear_and_catch_warnings(warnings.catch_warnings[_W_co], Generic[_W_co]):
133133
class_modules: ClassVar[tuple[types.ModuleType, ...]] = ()
134134
modules: Final[set[types.ModuleType]]
135135

0 commit comments

Comments
 (0)