Skip to content

Commit c83456f

Browse files
committed
reduce AggFuncType
1 parent e851837 commit c83456f

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

pandas-stubs/core/frame.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,12 @@ from pandas._libs.lib import _NoDefaultDoNotUse
8383
from pandas._libs.missing import NAType
8484
from pandas._libs.tslibs import BaseOffset
8585
from pandas._libs.tslibs.nattype import NaTType
86-
from pandas._typing import (
87-
AggFuncTypeFrame, # pyright: ignore[reportUnknownVariableType]
88-
)
8986
from pandas._typing import (
9087
S2,
88+
AggFuncTypeBase,
9189
AggFuncTypeDictFrame,
9290
AggFuncTypeDictSeries,
91+
AggFuncTypeFrame,
9392
AlignJoin,
9493
AnyAll,
9594
AnyArrayLike,
@@ -174,7 +173,6 @@ from pandas._typing import (
174173
np_ndarray_float,
175174
np_ndarray_num,
176175
)
177-
from pandas._typing import AggFuncTypeBase # pyright: ignore[reportUnknownVariableType]
178176

179177
from pandas.io.formats.style import Styler
180178
from pandas.plotting import PlotAccessor

pandas-stubs/core/groupby/generic.pyi

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ from pandas.core.series import Series
2929
from typing_extensions import Self
3030

3131
from pandas._libs.tslibs.timestamps import Timestamp
32-
from pandas._typing import (
33-
AggFuncTypeFrame, # pyright: ignore[reportUnknownVariableType]
34-
)
3532
from pandas._typing import (
3633
S2,
3734
S3,
35+
AggFuncTypeBase,
36+
AggFuncTypeFrame,
3837
ByT,
3938
CorrelationMethod,
4039
Dtype,
@@ -49,7 +48,6 @@ from pandas._typing import (
4948
WindowingEngineKwargs,
5049
np_ndarray,
5150
)
52-
from pandas._typing import AggFuncTypeBase # pyright: ignore[reportUnknownVariableType]
5351

5452
AggScalar: TypeAlias = str | Callable[..., Any]
5553

@@ -97,7 +95,7 @@ class SeriesGroupBy(GroupBy[Series[S2]], Generic[S2, ByT]):
9795
engine_kwargs: WindowingEngineKwargs = ...,
9896
**kwargs: Any,
9997
) -> Series: ...
100-
agg = aggregate # pyright: ignore[reportUnknownVariableType]
98+
agg = aggregate
10199
@overload
102100
def transform(
103101
self,

pandas-stubs/core/series.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,14 @@ from pandas._libs.lib import _NoDefaultDoNotUse
136136
from pandas._libs.missing import NAType
137137
from pandas._libs.tslibs import BaseOffset
138138
from pandas._libs.tslibs.nattype import NaTType
139-
from pandas._typing import (
140-
AggFuncTypeSeriesToFrame, # pyright: ignore[reportUnknownVariableType]
141-
)
142139
from pandas._typing import (
143140
S1,
144141
S2,
145142
S2_NSDT,
146143
T_COMPLEX,
144+
AggFuncTypeBase,
147145
AggFuncTypeDictFrame,
146+
AggFuncTypeSeriesToFrame,
148147
AnyAll,
149148
AnyArrayLike,
150149
ArrayLike,
@@ -247,7 +246,6 @@ from pandas._typing import (
247246
np_ndarray_str,
248247
np_ndarray_td,
249248
)
250-
from pandas._typing import AggFuncTypeBase # pyright: ignore[reportUnknownVariableType]
251249

252250
from pandas.core.dtypes.base import ExtensionDtype
253251
from pandas.core.dtypes.dtypes import CategoricalDtype

pandas-stubs/core/window/rolling.pyi

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ from typing_extensions import Self
1919

2020
from pandas._libs.tslibs import BaseOffset
2121
from pandas._typing import (
22-
AggFuncTypeFrame, # pyright: ignore[reportUnknownVariableType]
23-
)
24-
from pandas._typing import (
25-
AggFuncTypeSeriesToFrame, # pyright: ignore[reportUnknownVariableType]
26-
)
27-
from pandas._typing import (
22+
AggFuncTypeBase,
23+
AggFuncTypeFrame,
24+
AggFuncTypeSeriesToFrame,
2825
AxisInt,
2926
CalculationMethod,
3027
IntervalClosedType,
@@ -34,7 +31,6 @@ from pandas._typing import (
3431
WindowingEngineKwargs,
3532
WindowingRankType,
3633
)
37-
from pandas._typing import AggFuncTypeBase # pyright: ignore[reportUnknownVariableType]
3834

3935
class BaseWindow(SelectionMixin[NDFrameT]):
4036
on: str | Index | None

0 commit comments

Comments
 (0)