From 75c8c4e01e8fed2c49040cc7885ffe6f3f3d5356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Diridollou?= Date: Thu, 6 Nov 2025 08:16:26 -0500 Subject: [PATCH] GH1447 Example --- pandas-stubs/core/series.pyi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandas-stubs/core/series.pyi b/pandas-stubs/core/series.pyi index 32b6bc8a5..4b07c92bb 100644 --- a/pandas-stubs/core/series.pyi +++ b/pandas-stubs/core/series.pyi @@ -106,6 +106,7 @@ from pandas.core.window.rolling import ( from typing_extensions import ( Never, Self, + override, ) import xarray as xr @@ -2190,13 +2191,17 @@ class Series(IndexOpsMixin[S1], ElementOpsMixin[S1], NDFrame): axis: int = 0, ) -> Series[_str]: ... # ignore needed for mypy as we want different results based on the arguments - @overload # type: ignore[override] + @overload + @override # pyrefly: ignore # bad-override - def __and__( # pyright: ignore[reportOverlappingOverload] + def __and__( self, other: bool | list[int] | MaskType ) -> Series[bool]: ... @overload - def __and__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ... + def __and__( # pyright: ignore[reportOverlappingOverload] + self, other: int | np_ndarray_anyint | Series[int] + ) -> Series[int]: ... + @override def __eq__(self, other: object) -> Series[_bool]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @overload def __floordiv__(self, other: Index[Never] | Series[Never]) -> Series: ...