Skip to content

Commit c4e42d3

Browse files
committed
fix mypy issues
1 parent f0fe171 commit c4e42d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pandas/core/apply.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def transform(self) -> DataFrame | Series:
232232
func = cast(AggFuncTypeDict, func)
233233
return self.transform_dict_like(func)
234234

235-
if not self.by_row:
235+
if not by_row:
236236
result = obj.apply(func, by_row=by_row, args=args, **kwargs)
237237
else:
238238
# func is either str or callable

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9980,7 +9980,7 @@ def transform(
99809980
stacklevel=find_stack_level(),
99819981
)
99829982

9983-
by_row = False if series_ops_only else "compat"
9983+
by_row: Literal[False, "compat"] = False if series_ops_only else "compat"
99849984

99859985
op = frame_apply(
99869986
self, func=func, axis=axis, args=args, by_row=by_row, kwargs=kwargs

pandas/core/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4632,7 +4632,7 @@ def transform(
46324632
stacklevel=find_stack_level(),
46334633
)
46344634

4635-
by_row = False if series_ops_only else "compat"
4635+
by_row: Literal[False, "compat"] = False if series_ops_only else "compat"
46364636
ser = self.copy(deep=False) if using_copy_on_write() else self
46374637
result = SeriesApply(
46384638
ser, func=func, by_row=by_row, args=args, kwargs=kwargs

0 commit comments

Comments
 (0)