Skip to content

Commit 1160e89

Browse files
committed
Revert "remove pyright overrides not needed with pyright 1.1.374 (pandas-dev#967)"
This reverts commit 458ecb4.
1 parent 1b4fd6f commit 1160e89

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

pandas-stubs/core/indexes/datetimelike.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DatetimeIndexOpsMixin(ExtensionIndex[S1]):
1919
def argmin(self, axis=..., skipna: bool = ..., *args, **kwargs): ...
2020
def max(self, axis=..., skipna: bool = ..., *args, **kwargs): ...
2121
def argmax(self, axis=..., skipna: bool = ..., *args, **kwargs): ...
22-
def __rsub__( # type: ignore[override]
22+
def __rsub__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
2323
self, other: DatetimeIndexOpsMixin
2424
) -> TimedeltaIndex: ...
2525

pandas-stubs/core/series.pyi

+16-10
Original file line numberDiff line numberDiff line change
@@ -1506,21 +1506,23 @@ class Series(IndexOpsMixin[S1], NDFrame):
15061506
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15071507
) -> Series[bool]: ...
15081508
@overload
1509-
def __and__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
1509+
def __and__( # pyright: ignore[reportIncompatibleMethodOverride]
1510+
self, other: int | np_ndarray_anyint | Series[int]
1511+
) -> Series[int]: ...
15101512
# def __array__(self, dtype: Optional[_bool] = ...) -> _np_ndarray
15111513
def __div__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ...
15121514
def __eq__(self, other: object) -> Series[_bool]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15131515
def __floordiv__(self, other: num | _ListLike | Series[S1]) -> Series[int]: ...
1514-
def __ge__( # type: ignore[override]
1516+
def __ge__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15151517
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15161518
) -> Series[_bool]: ...
1517-
def __gt__( # type: ignore[override]
1519+
def __gt__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15181520
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15191521
) -> Series[_bool]: ...
1520-
def __le__( # type: ignore[override]
1522+
def __le__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15211523
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15221524
) -> Series[_bool]: ...
1523-
def __lt__( # type: ignore[override]
1525+
def __lt__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15241526
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15251527
) -> Series[_bool]: ...
15261528
@overload
@@ -1538,7 +1540,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
15381540
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15391541
) -> Series[bool]: ...
15401542
@overload
1541-
def __or__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
1543+
def __or__( # pyright: ignore[reportIncompatibleMethodOverride]
1544+
self, other: int | np_ndarray_anyint | Series[int]
1545+
) -> Series[int]: ...
15421546
@overload
15431547
def __radd__(self, other: S1 | Series[S1]) -> Self: ...
15441548
@overload
@@ -1549,7 +1553,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15491553
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15501554
) -> Series[bool]: ...
15511555
@overload
1552-
def __rand__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc]
1556+
def __rand__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc] # pyright: ignore[reportIncompatibleMethodOverride]
15531557
def __rdiv__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ...
15541558
def __rdivmod__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15551559
def __rfloordiv__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ...
@@ -1568,7 +1572,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15681572
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15691573
) -> Series[bool]: ...
15701574
@overload
1571-
def __ror__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc]
1575+
def __ror__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc] # pyright: ignore[reportIncompatibleMethodOverride]
15721576
def __rsub__(self, other: num | _ListLike | Series[S1]) -> Series: ...
15731577
def __rtruediv__(self, other: num | _ListLike | Series[S1]) -> Series: ...
15741578
# ignore needed for mypy as we want different results based on the arguments
@@ -1577,7 +1581,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15771581
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15781582
) -> Series[bool]: ...
15791583
@overload
1580-
def __rxor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc]
1584+
def __rxor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc] # pyright: ignore[reportIncompatibleMethodOverride]
15811585
@overload
15821586
def __sub__(
15831587
self: Series[Timestamp],
@@ -1601,7 +1605,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
16011605
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
16021606
) -> Series[bool]: ...
16031607
@overload
1604-
def __xor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
1608+
def __xor__( # pyright: ignore[reportIncompatibleMethodOverride]
1609+
self, other: int | np_ndarray_anyint | Series[int]
1610+
) -> Series[int]: ...
16051611
def __invert__(self) -> Series[bool]: ...
16061612
# properties
16071613
# @property

0 commit comments

Comments
 (0)