Skip to content

Commit d333902

Browse files
committed
fix: reduce ignore
1 parent 3458fc9 commit d333902

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas-stubs/_typing.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ SeriesDTypeClosure: TypeAlias = (
838838
| list[str]
839839
)
840840
S1C = TypeVar("S1C", bound=SeriesDTypeClosure, default=Any)
841+
S2C = TypeVar("S2C", bound=SeriesDTypeClosure)
841842

842843
SeriesDType: TypeAlias = (
843844
SeriesDTypeClosure

pandas-stubs/core/series.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ from pandas.core.dtypes.dtypes import CategoricalDtype
188188
from pandas.plotting import PlotAccessor
189189

190190
_T_COMPLEX = TypeVar("_T_COMPLEX", bound=complex)
191+
_T_TIMESTAMP = TypeVar("_T_TIMESTAMP", bound=Timestamp)
191192

192193
_scalar_timestamp: TypeAlias = date | datetime | np.datetime64
193194
_vector_timestamp: TypeAlias = (
@@ -2051,7 +2052,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
20512052
) -> Series[Timestamp]: ...
20522053
@overload
20532054
def __sub__(
2054-
self: Series[Timestamp], other: _nonseries_timestamp | Series[Timestamp]
2055+
self: Series[Timestamp], other: _nonseries_timestamp | Series[_T_TIMESTAMP]
20552056
) -> TimedeltaSeries: ...
20562057
@overload
20572058
def __truediv__(
@@ -2917,7 +2918,7 @@ class TimedeltaSeries(Series[Timedelta]):
29172918
numeric_only: _bool = ...,
29182919
**kwargs: Any,
29192920
) -> Timedelta: ...
2920-
def median( # mypy: ignore[override]
2921+
def median( # type: ignore[override]
29212922
self,
29222923
axis: AxisIndex | None = ...,
29232924
skipna: _bool = ...,

0 commit comments

Comments
 (0)