Skip to content

Commit f8a329d

Browse files
authored
Remove some unnecessary S1 TypeVars (#1233)
1 parent ba4ebd8 commit f8a329d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

‎pandas-stubs/core/frame.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ from pandas.core.reshape.pivot import (
5050
_PivotTableIndexTypes,
5151
_PivotTableValuesTypes,
5252
)
53-
from pandas.core.series import Series
53+
from pandas.core.series import (
54+
Series,
55+
UnknownSeries,
56+
)
5457
from pandas.core.window import (
5558
Expanding,
5659
ExponentialMovingWindow,
@@ -2008,7 +2011,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
20082011
| Callable[[DataFrame], DataFrame]
20092012
| Callable[[Any], _bool]
20102013
),
2011-
other: Scalar | Series[S1] | DataFrame | Callable | NAType | None = ...,
2014+
other: Scalar | UnknownSeries | DataFrame | Callable | NAType | None = ...,
20122015
*,
20132016
inplace: Literal[True],
20142017
axis: Axis | None = ...,
@@ -2024,7 +2027,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
20242027
| Callable[[DataFrame], DataFrame]
20252028
| Callable[[Any], _bool]
20262029
),
2027-
other: Scalar | Series[S1] | DataFrame | Callable | NAType | None = ...,
2030+
other: Scalar | UnknownSeries | DataFrame | Callable | NAType | None = ...,
20282031
*,
20292032
inplace: Literal[False] = ...,
20302033
axis: Axis | None = ...,

‎pandas-stubs/core/generic.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ import numpy as np
1919
from pandas import Index
2020
import pandas.core.indexing as indexing
2121
from pandas.core.resample import DatetimeIndexResampler
22-
from pandas.core.series import Series
22+
from pandas.core.series import (
23+
UnknownSeries,
24+
)
2325
import sqlalchemy.engine
2426
from typing_extensions import (
2527
Concatenate,
@@ -28,7 +30,6 @@ from typing_extensions import (
2830

2931
from pandas._libs.lib import NoDefault
3032
from pandas._typing import (
31-
S1,
3233
Axis,
3334
CompressionOptions,
3435
CSVQuoting,
@@ -81,7 +82,7 @@ class NDFrame(indexing.IndexingMixin):
8182
def ndim(self) -> int: ...
8283
@property
8384
def size(self) -> int: ...
84-
def equals(self, other: Series[S1]) -> _bool: ...
85+
def equals(self, other: UnknownSeries) -> _bool: ...
8586
def __neg__(self) -> Self: ...
8687
def __pos__(self) -> Self: ...
8788
def __nonzero__(self) -> None: ...

0 commit comments

Comments
 (0)