@@ -30,7 +30,7 @@ from typing_extensions import (
30
30
31
31
from pandas ._libs .tslibs .timestamps import Timestamp
32
32
from pandas ._typing import (
33
- S2 ,
33
+ S1 ,
34
34
AggFuncTypeBase ,
35
35
AggFuncTypeFrame ,
36
36
ByT ,
@@ -52,7 +52,7 @@ class NamedAgg(NamedTuple):
52
52
column : str
53
53
aggfunc : AggScalar
54
54
55
- class SeriesGroupBy (GroupBy [Series [S2 ]], Generic [S2 , ByT ]):
55
+ class SeriesGroupBy (GroupBy [Series [S1 ]], Generic [S1 , ByT ]):
56
56
@overload
57
57
def aggregate (
58
58
self ,
@@ -114,7 +114,7 @@ class SeriesGroupBy(GroupBy[Series[S2]], Generic[S2, ByT]):
114
114
self ,
115
115
indices : TakeIndexer ,
116
116
** kwargs ,
117
- ) -> Series [S2 ]: ...
117
+ ) -> Series [S1 ]: ...
118
118
def skew (
119
119
self ,
120
120
skipna : bool = ...,
@@ -125,10 +125,10 @@ class SeriesGroupBy(GroupBy[Series[S2]], Generic[S2, ByT]):
125
125
def plot (self ) -> GroupByPlot [Self ]: ...
126
126
def nlargest (
127
127
self , n : int = ..., keep : NsmallestNlargestKeep = ...
128
- ) -> Series [S2 ]: ...
128
+ ) -> Series [S1 ]: ...
129
129
def nsmallest (
130
130
self , n : int = ..., keep : NsmallestNlargestKeep = ...
131
- ) -> Series [S2 ]: ...
131
+ ) -> Series [S1 ]: ...
132
132
def idxmin (self , skipna : bool = ...) -> Series : ...
133
133
def idxmax (self , skipna : bool = ...) -> Series : ...
134
134
def corr (
@@ -166,9 +166,9 @@ class SeriesGroupBy(GroupBy[Series[S2]], Generic[S2, ByT]):
166
166
@final # type: ignore[misc]
167
167
def __iter__ ( # pyright: ignore[reportIncompatibleMethodOverride]
168
168
self ,
169
- ) -> Iterator [tuple [ByT , Series [S2 ]]]: ...
169
+ ) -> Iterator [tuple [ByT , Series [S1 ]]]: ...
170
170
171
- _TT = TypeVar ("_TT" , bound = Literal [True , False ])
171
+ _TT = TypeVar ("_TT" , bound = Literal [True , False ], default = Literal [ True ] )
172
172
173
173
class DataFrameGroupBy (GroupBy [DataFrame ], Generic [ByT , _TT ]):
174
174
# error: Overload 3 for "apply" will never be used because its parameters overlap overload 1
@@ -217,7 +217,7 @@ class DataFrameGroupBy(GroupBy[DataFrame], Generic[ByT, _TT]):
217
217
def filter (
218
218
self , func : Callable , dropna : bool = ..., * args , ** kwargs
219
219
) -> DataFrame : ...
220
- @overload
220
+ @overload # type: ignore[override]
221
221
def __getitem__ (self , key : Scalar ) -> SeriesGroupBy [Any , ByT ]: ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
222
222
@overload
223
223
def __getitem__ ( # pyright: ignore[reportIncompatibleMethodOverride]
0 commit comments