diff --git a/pandas-stubs/core/indexes/datetimelike.pyi b/pandas-stubs/core/indexes/datetimelike.pyi index 8ff1ae14..34a48317 100644 --- a/pandas-stubs/core/indexes/datetimelike.pyi +++ b/pandas-stubs/core/indexes/datetimelike.pyi @@ -29,7 +29,7 @@ class DatetimeIndexOpsMixin(ExtensionIndex[S1]): def argmax( self, axis: AxisIndex | None = ..., skipna: bool = ..., *args, **kwargs ) -> np.int64: ... - def __rsub__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __rsub__( # type: ignore[override] self, other: DatetimeIndexOpsMixin ) -> TimedeltaIndex: ... diff --git a/pandas-stubs/core/indexes/interval.pyi b/pandas-stubs/core/indexes/interval.pyi index 34f7aaa7..760b8807 100644 --- a/pandas-stubs/core/indexes/interval.pyi +++ b/pandas-stubs/core/indexes/interval.pyi @@ -267,25 +267,33 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin): self, other: IntervalT | IntervalIndex[IntervalT] ) -> np_ndarray_bool: ... @overload - def __gt__(self, other: pd.Series[IntervalT]) -> pd.Series[bool]: ... + def __gt__( # pyright: ignore[reportIncompatibleMethodOverride] + self, other: pd.Series[IntervalT] + ) -> pd.Series[bool]: ... @overload # type: ignore[override] def __ge__( self, other: IntervalT | IntervalIndex[IntervalT] ) -> np_ndarray_bool: ... @overload - def __ge__(self, other: pd.Series[IntervalT]) -> pd.Series[bool]: ... + def __ge__( # pyright: ignore[reportIncompatibleMethodOverride] + self, other: pd.Series[IntervalT] + ) -> pd.Series[bool]: ... @overload # type: ignore[override] def __le__( self, other: IntervalT | IntervalIndex[IntervalT] ) -> np_ndarray_bool: ... @overload - def __le__(self, other: pd.Series[IntervalT]) -> pd.Series[bool]: ... + def __le__( # pyright: ignore[reportIncompatibleMethodOverride] + self, other: pd.Series[IntervalT] + ) -> pd.Series[bool]: ... @overload # type: ignore[override] def __lt__( self, other: IntervalT | IntervalIndex[IntervalT] ) -> np_ndarray_bool: ... @overload - def __lt__(self, other: pd.Series[IntervalT]) -> pd.Series[bool]: ... + def __lt__( # pyright: ignore[reportIncompatibleMethodOverride] + self, other: pd.Series[IntervalT] + ) -> pd.Series[bool]: ... @overload # type: ignore[override] def __eq__(self, other: IntervalT | IntervalIndex[IntervalT]) -> np_ndarray_bool: ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] @overload diff --git a/pandas-stubs/core/indexes/multi.pyi b/pandas-stubs/core/indexes/multi.pyi index 13af9c68..2882d38c 100644 --- a/pandas-stubs/core/indexes/multi.pyi +++ b/pandas-stubs/core/indexes/multi.pyi @@ -154,7 +154,9 @@ class MultiIndex(Index[Any]): def equals(self, other) -> bool: ... def equal_levels(self, other): ... def union(self, other, sort=...): ... - def intersection(self, other: list | Self, sort: bool = ...): ... + def intersection( # pyright: ignore[reportIncompatibleMethodOverride] + self, other: list | Self, sort: bool = ... + ): ... def difference(self, other, sort=...): ... def astype(self, dtype: DtypeArg, copy: bool = ...) -> Self: ... def insert(self, loc, item): ... diff --git a/pandas-stubs/core/indexes/timedeltas.pyi b/pandas-stubs/core/indexes/timedeltas.pyi index 59b2c7aa..a090fed3 100644 --- a/pandas-stubs/core/indexes/timedeltas.pyi +++ b/pandas-stubs/core/indexes/timedeltas.pyi @@ -54,7 +54,7 @@ class TimedeltaIndex(DatetimeTimedeltaMixin[Timedelta], TimedeltaIndexProperties def __add__(self, other: DatetimeIndex) -> DatetimeIndex: ... @overload def __add__(self, other: dt.timedelta | Timedelta | Self) -> Self: ... - def __radd__(self, other: dt.datetime | Timestamp | DatetimeIndex) -> DatetimeIndex: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __radd__(self, other: dt.datetime | Timestamp | DatetimeIndex) -> DatetimeIndex: ... # type: ignore[override] def __sub__(self, other: dt.timedelta | Timedelta | Self) -> Self: ... def __mul__(self, other: num) -> Self: ... @overload # type: ignore[override] diff --git a/pandas-stubs/core/series.pyi b/pandas-stubs/core/series.pyi index 4226670b..f5824c46 100644 --- a/pandas-stubs/core/series.pyi +++ b/pandas-stubs/core/series.pyi @@ -1602,23 +1602,21 @@ class Series(IndexOpsMixin[S1], NDFrame): self, other: bool | list[int] | MaskType ) -> Series[bool]: ... @overload - def __and__( # pyright: ignore[reportIncompatibleMethodOverride] - self, other: int | np_ndarray_anyint | Series[int] - ) -> Series[int]: ... + def __and__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... # def __array__(self, dtype: Optional[_bool] = ...) -> _np_ndarray def __div__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... def __eq__(self, other: object) -> Series[_bool]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def __floordiv__(self, other: num | _ListLike | Series[S1]) -> Series[int]: ... - def __ge__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __ge__( # type: ignore[override] self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date ) -> Series[_bool]: ... - def __gt__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __gt__( # type: ignore[override] self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date ) -> Series[_bool]: ... - def __le__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __le__( # type: ignore[override] self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date ) -> Series[_bool]: ... - def __lt__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __lt__( # type: ignore[override] self, other: S1 | _ListLike | Series[S1] | datetime | timedelta | date ) -> Series[_bool]: ... @overload @@ -1636,9 +1634,7 @@ class Series(IndexOpsMixin[S1], NDFrame): self, other: bool | list[int] | MaskType ) -> Series[bool]: ... @overload - def __or__( # pyright: ignore[reportIncompatibleMethodOverride] - self, other: int | np_ndarray_anyint | Series[int] - ) -> Series[int]: ... + def __or__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... @overload def __radd__(self, other: S1 | Series[S1]) -> Self: ... @overload @@ -1651,9 +1647,7 @@ class Series(IndexOpsMixin[S1], NDFrame): self, other: bool | MaskType | list[int] ) -> Series[bool]: ... @overload - def __rand__( # pyright: ignore[reportIncompatibleMethodOverride] - self, other: int | np_ndarray_anyint | Series[int] - ) -> Series[int]: ... + def __rand__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... def __rdiv__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... def __rdivmod__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def __rfloordiv__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... @@ -1672,9 +1666,7 @@ class Series(IndexOpsMixin[S1], NDFrame): self, other: bool | MaskType | list[int] ) -> Series[bool]: ... @overload - def __ror__( # pyright: ignore[reportIncompatibleMethodOverride] - self, other: int | np_ndarray_anyint | Series[int] - ) -> Series[int]: ... + def __ror__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... def __rsub__(self, other: num | _ListLike | Series[S1]) -> UnknownSeries: ... def __rtruediv__( self, other: num | _ListLike | Series[S1] | Path @@ -1685,9 +1677,7 @@ class Series(IndexOpsMixin[S1], NDFrame): self, other: bool | MaskType | list[int] ) -> Series[bool]: ... @overload - def __rxor__( # pyright: ignore[reportIncompatibleMethodOverride] - self, other: int | np_ndarray_anyint | Series[int] - ) -> Series[int]: ... + def __rxor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... @overload def __sub__( self: Series[Timestamp], @@ -1713,9 +1703,7 @@ class Series(IndexOpsMixin[S1], NDFrame): self, other: bool | MaskType | list[int] ) -> Series[bool]: ... @overload - def __xor__( # pyright: ignore[reportIncompatibleMethodOverride] - self, other: int | np_ndarray_anyint | Series[int] - ) -> Series[int]: ... + def __xor__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... def __invert__(self) -> Series[bool]: ... # properties # @property diff --git a/pyproject.toml b/pyproject.toml index c1477adf..19579a6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ mypy = "1.15.0" pandas = "2.2.3" pyarrow = ">=10.0.1" pytest = ">=7.1.2" -pyright = "1.1.397" +pyright = ">=1.1.400" poethepoet = ">=0.16.5" loguru = ">=0.6.0" typing-extensions = ">=4.4.0"