@@ -246,12 +246,8 @@ def transform(self) -> DataFrame | Series:
246
246
and not obj .empty
247
247
):
248
248
raise ValueError ("Transform function failed" )
249
- # error: Argument 1 to "__get__" of "AxisProperty" has incompatible type
250
- # "Union[Series, DataFrame, GroupBy[Any], SeriesGroupBy,
251
- # DataFrameGroupBy, BaseWindow, Resampler]"; expected "Union[DataFrame,
252
- # Series]"
253
249
if not isinstance (result , (ABCSeries , ABCDataFrame )) or not result .index .equals (
254
- obj .index # type: ignore[arg-type]
250
+ obj .index
255
251
):
256
252
raise ValueError ("Function did not transform" )
257
253
@@ -803,7 +799,7 @@ def result_columns(self) -> Index:
803
799
804
800
@property
805
801
@abc .abstractmethod
806
- def series_generator (self ) -> Generator [Series , None , None ]:
802
+ def series_generator (self ) -> Generator [Series ]:
807
803
pass
808
804
809
805
@staticmethod
@@ -1128,7 +1124,7 @@ class FrameRowApply(FrameApply):
1128
1124
axis : AxisInt = 0
1129
1125
1130
1126
@property
1131
- def series_generator (self ) -> Generator [Series , None , None ]:
1127
+ def series_generator (self ) -> Generator [Series ]:
1132
1128
return (self .obj ._ixs (i , axis = 1 ) for i in range (len (self .columns )))
1133
1129
1134
1130
@staticmethod
@@ -1235,7 +1231,7 @@ def apply_broadcast(self, target: DataFrame) -> DataFrame:
1235
1231
return result .T
1236
1232
1237
1233
@property
1238
- def series_generator (self ) -> Generator [Series , None , None ]:
1234
+ def series_generator (self ) -> Generator [Series ]:
1239
1235
values = self .values
1240
1236
values = ensure_wrapped_if_datetimelike (values )
1241
1237
assert len (values ) > 0
0 commit comments