Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(test): floordiv
  • Loading branch information
cmp0xff committed Sep 24, 2025
commit 9d364bef53abd6899b87aaa95984b5ceda459acd
218 changes: 179 additions & 39 deletions pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ from pandas._typing import (
WriteBuffer,
_T_co,
np_1darray,
np_ndarray,
np_ndarray_anyint,
np_ndarray_bool,
np_ndarray_complex,
Expand Down Expand Up @@ -2274,42 +2275,83 @@ class Series(IndexOpsMixin[S1], NDFrame):
def __floordiv__(self, other: Index[Never] | Series[Never]) -> Series: ...
@overload
def __floordiv__(
self: Series[bool] | Series[int] | Series[float],
self: Series[int] | Series[float],
other: np_ndarray_bool | np_ndarray_complex | np_ndarray_dt | np_ndarray_td,
) -> Never: ...
@overload
def __floordiv__(
self: Series[bool] | Series[complex], other: np_ndarray
) -> Never: ...
@overload
def __floordiv__(
self: Series[int],
other: (
float
| Sequence[float]
| np_ndarray_bool
Just[int]
| Sequence[Just[int]]
| np_ndarray_anyint
| Index[int]
| Series[int]
),
) -> Series[int]: ...
@overload
def __floordiv__(
self: Series[int],
other: (
Just[float]
| Sequence[Just[float]]
| np_ndarray_float
| Index[float]
| Series[float]
),
) -> Series[float]: ...
@overload
def __floordiv__(
self: Series[float],
other: (
Just[int]
| Just[float]
| Sequence[Just[int]]
| Sequence[Just[float]]
| np_ndarray_anyint
| np_ndarray_float
| Index[bool]
| Index[int]
| Index[float]
| Series[bool]
| Series[int]
| Series[float]
),
) -> Series[int]: ...
) -> Series[float]: ...
@overload
def __floordiv__(
self: Series[Timedelta],
other: np_ndarray_bool | np_ndarray_complex | np_ndarray_dt,
) -> Never: ...
@overload
def __floordiv__(
self: Series[Timedelta],
other: (
float
| Sequence[float]
| np_ndarray_bool
Just[int]
| Just[float]
| Sequence[Just[int]]
| Sequence[Just[float]]
| np_ndarray_anyint
| np_ndarray_float
| Index[bool]
| Index[int]
| Index[float]
| Series[bool]
| Series[int]
| Series[float]
),
) -> Series[Timedelta]: ...
@overload
def __floordiv__(
self: Series[Timedelta],
other: timedelta | Sequence[timedelta] | np.timedelta64 | Series[Timedelta],
other: (
timedelta
| Sequence[timedelta]
| np.timedelta64
| np_ndarray_td
| TimedeltaIndex
| Series[Timedelta]
),
) -> Series[int]: ...
@overload
def floordiv(
Expand All @@ -2321,37 +2363,63 @@ class Series(IndexOpsMixin[S1], NDFrame):
) -> Series: ...
@overload
def floordiv(
self: Series[bool] | Series[int] | Series[float],
self: Series[int],
other: (
float
| Sequence[float]
| np_ndarray_bool
Just[int]
| Sequence[Just[int]]
| np_ndarray_anyint
| Index[int]
| Series[int]
),
level: Level | None = ...,
fill_value: float | None = None,
axis: AxisIndex | None = 0,
) -> Series[int]: ...
@overload
def floordiv(
self: Series[int],
other: (
Just[float]
| Sequence[Just[float]]
| np_ndarray_float
| Index[float]
| Series[float]
),
level: Level | None = ...,
fill_value: float | None = None,
axis: AxisIndex | None = 0,
) -> Series[float]: ...
@overload
def floordiv(
self: Series[float],
other: (
Just[int]
| Just[float]
| Sequence[Just[int]]
| Sequence[Just[float]]
| np_ndarray_anyint
| np_ndarray_float
| Index[bool]
| Index[int]
| Index[float]
| Series[bool]
| Series[int]
| Series[float]
),
level: Level | None = ...,
fill_value: float | None = None,
axis: AxisIndex | None = 0,
) -> Series[int]: ...
) -> Series[float]: ...
@overload
def floordiv(
self: Series[Timedelta],
other: (
float
| Sequence[float]
| np_ndarray_bool
Just[int]
| Just[float]
| Sequence[Just[int]]
| Sequence[Just[float]]
| np_ndarray_anyint
| np_ndarray_float
| Index[bool]
| Index[int]
| Index[float]
| Series[bool]
| Series[int]
| Series[float]
),
Expand All @@ -2366,6 +2434,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
timedelta
| Sequence[timedelta]
| np.timedelta64
| np_ndarray_td
| TimedeltaIndex
| Series[Timedelta]
),
Expand All @@ -2377,28 +2446,70 @@ class Series(IndexOpsMixin[S1], NDFrame):
def __rfloordiv__(self, other: Index[Never] | Series[Never]) -> Series: ...
@overload
def __rfloordiv__(
self: Series[bool] | Series[int] | Series[float],
self: Series[int] | Series[float],
other: np_ndarray_bool | np_ndarray_complex | np_ndarray_dt | np_ndarray_td,
) -> Never: ...
@overload
def __rfloordiv__(
self: Series[bool] | Series[complex], other: np_ndarray
) -> Never: ...
@overload
def __rfloordiv__(
self: Series[int],
other: (
float
| Sequence[float]
| np_ndarray_bool
Just[int]
| Sequence[Just[int]]
| np_ndarray_anyint
| Index[int]
| Series[int]
),
) -> Series[int]: ...
@overload
def __rfloordiv__(
self: Series[int],
other: (
Just[float]
| Sequence[Just[float]]
| np_ndarray_float
| Index[float]
| Series[float]
),
) -> Series[float]: ...
@overload
def __rfloordiv__(
self: Series[float],
other: (
Just[int]
| Just[float]
| Sequence[Just[int]]
| Sequence[Just[float]]
| np_ndarray_anyint
| np_ndarray_float
| Index[bool]
| Index[int]
| Index[float]
| Series[bool]
| Series[int]
| Series[float]
),
) -> Series[int]: ...
) -> Series[float]: ...
@overload
def __rfloordiv__(
self: Series[Timedelta],
other: (
np_ndarray_bool
| np_ndarray_anyint
| np_ndarray_float
| np_ndarray_complex
| np_ndarray_dt
),
) -> Never: ...
@overload
def __rfloordiv__(
self: Series[Timedelta],
other: (
timedelta
| Sequence[timedelta]
| np.timedelta64
| np_ndarray_td
| TimedeltaIndex
| Series[Timedelta]
),
Expand All @@ -2413,30 +2524,59 @@ class Series(IndexOpsMixin[S1], NDFrame):
) -> Series: ...
@overload
def rfloordiv(
self: Series[bool] | Series[int] | Series[float],
self: Series[int],
other: (
float
| Sequence[float]
| np_ndarray_bool
Just[int]
| Sequence[Just[int]]
| np_ndarray_anyint
| Index[int]
| Series[int]
),
level: Level | None = ...,
fill_value: float | None = None,
axis: AxisIndex = ...,
) -> Series[int]: ...
@overload
def rfloordiv(
self: Series[int],
other: (
Just[float]
| Sequence[Just[float]]
| np_ndarray_float
| Index[float]
| Series[float]
),
level: Level | None = ...,
fill_value: float | None = None,
axis: AxisIndex = ...,
) -> Series[float]: ...
@overload
def rfloordiv(
self: Series[float],
other: (
Just[int]
| Just[float]
| Sequence[Just[int]]
| Sequence[Just[float]]
| np_ndarray_anyint
| np_ndarray_float
| Index[bool]
| Index[int]
| Index[float]
| Series[bool]
| Series[int]
| Series[float]
),
level: Level | None = ...,
fill_value: float | None = None,
axis: AxisIndex = ...,
) -> Series[int]: ...
) -> Series[float]: ...
@overload
def rfloordiv(
self: Series[Timedelta],
other: (
timedelta
| Sequence[timedelta]
| np.timedelta64
| np_ndarray_td
| TimedeltaIndex
| Series[Timedelta]
),
Expand Down
Loading
Loading