Skip to content

Commit 458ecb4

Browse files
authored
remove pyright overrides not needed with pyright 1.1.374 (#967)
1 parent 48ca4b0 commit 458ecb4

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
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] # pyright: ignore[reportIncompatibleMethodOverride]
22+
def __rsub__( # type: ignore[override]
2323
self, other: DatetimeIndexOpsMixin
2424
) -> TimedeltaIndex: ...
2525

pandas-stubs/core/series.pyi

+10-16
Original file line numberDiff line numberDiff line change
@@ -1506,23 +1506,21 @@ 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__( # pyright: ignore[reportIncompatibleMethodOverride]
1510-
self, other: int | np_ndarray_anyint | Series[int]
1511-
) -> Series[int]: ...
1509+
def __and__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
15121510
# def __array__(self, dtype: Optional[_bool] = ...) -> _np_ndarray
15131511
def __div__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ...
15141512
def __eq__(self, other: object) -> Series[_bool]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15151513
def __floordiv__(self, other: num | _ListLike | Series[S1]) -> Series[int]: ...
1516-
def __ge__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
1514+
def __ge__( # type: ignore[override]
15171515
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15181516
) -> Series[_bool]: ...
1519-
def __gt__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
1517+
def __gt__( # type: ignore[override]
15201518
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15211519
) -> Series[_bool]: ...
1522-
def __le__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
1520+
def __le__( # type: ignore[override]
15231521
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15241522
) -> Series[_bool]: ...
1525-
def __lt__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
1523+
def __lt__( # type: ignore[override]
15261524
self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date
15271525
) -> Series[_bool]: ...
15281526
@overload
@@ -1540,9 +1538,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15401538
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15411539
) -> Series[bool]: ...
15421540
@overload
1543-
def __or__( # pyright: ignore[reportIncompatibleMethodOverride]
1544-
self, other: int | np_ndarray_anyint | Series[int]
1545-
) -> Series[int]: ...
1541+
def __or__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
15461542
@overload
15471543
def __radd__(self, other: S1 | Series[S1]) -> Self: ...
15481544
@overload
@@ -1553,7 +1549,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15531549
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15541550
) -> Series[bool]: ...
15551551
@overload
1556-
def __rand__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc] # pyright: ignore[reportIncompatibleMethodOverride]
1552+
def __rand__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc]
15571553
def __rdiv__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ...
15581554
def __rdivmod__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
15591555
def __rfloordiv__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ...
@@ -1572,7 +1568,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15721568
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15731569
) -> Series[bool]: ...
15741570
@overload
1575-
def __ror__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc] # pyright: ignore[reportIncompatibleMethodOverride]
1571+
def __ror__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc]
15761572
def __rsub__(self, other: num | _ListLike | Series[S1]) -> Series: ...
15771573
def __rtruediv__(self, other: num | _ListLike | Series[S1]) -> Series: ...
15781574
# ignore needed for mypy as we want different results based on the arguments
@@ -1581,7 +1577,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15811577
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
15821578
) -> Series[bool]: ...
15831579
@overload
1584-
def __rxor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc] # pyright: ignore[reportIncompatibleMethodOverride]
1580+
def __rxor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # type: ignore[misc]
15851581
@overload
15861582
def __sub__(
15871583
self: Series[Timestamp],
@@ -1605,9 +1601,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
16051601
self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool]
16061602
) -> Series[bool]: ...
16071603
@overload
1608-
def __xor__( # pyright: ignore[reportIncompatibleMethodOverride]
1609-
self, other: int | np_ndarray_anyint | Series[int]
1610-
) -> Series[int]: ...
1604+
def __xor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
16111605
def __invert__(self) -> Series[bool]: ...
16121606
# properties
16131607
# @property

0 commit comments

Comments
 (0)