Skip to content

Commit eb648fb

Browse files
committed
mypy
1 parent c95aa39 commit eb648fb

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

tests/indexes/arithmetic/test_floordiv.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,26 @@ def test_floordiv_numpy_array(left_i: pd.Index) -> None:
9292
# `numpy` typing gives the corresponding `ndarray`s in the static type
9393
# checking, where our `__rfloordiv__` cannot override. At runtime, they lead to
9494
# errors or pd.Index.
95-
check(assert_type(b // left_i, "np.typing.NDArray[np.int8]"), pd.Index, np.integer)
96-
check(assert_type(i // left_i, "np.typing.NDArray[np.int64]"), pd.Index, np.integer)
9795
check(
98-
assert_type(f // left_i, "np.typing.NDArray[np.float64]"), pd.Index, np.floating
96+
assert_type(b // left_i, Any), # pyright: ignore[reportAssertTypeFailure]
97+
pd.Index,
98+
np.integer,
99+
)
100+
check(
101+
assert_type(i // left_i, Any), # pyright: ignore[reportAssertTypeFailure]
102+
pd.Index,
103+
np.integer,
104+
)
105+
check(
106+
assert_type(f // left_i, Any), # pyright: ignore[reportAssertTypeFailure]
107+
pd.Index,
108+
np.floating,
99109
)
100110
if TYPE_CHECKING_INVALID_USAGE:
101111
assert_type(c // left_i, Any)
102112
assert_type(s // left_i, Any)
103113
check(
104-
assert_type(d // left_i, "np.typing.NDArray[np.int64]"),
114+
assert_type(d // left_i, Any), # pyright: ignore[reportAssertTypeFailure]
105115
pd.TimedeltaIndex,
106116
pd.Timedelta,
107117
)

0 commit comments

Comments
 (0)