Skip to content

Commit 25f8968

Browse files
CLN: enable pylint's redefined-outer-name in pandas/core/resample.py (#49724)
* Rename "method" to "mthd" in outer scope * Change mthd to _method
1 parent 96b5780 commit 25f8968

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pandas/core/resample.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -1106,16 +1106,16 @@ def f( # type: ignore[misc]
11061106
setattr(Resampler, name, f)
11071107

11081108

1109-
for method in ["sum", "prod", "min", "max", "first", "last"]:
1110-
_add_downsample_kernel(method, ("numeric_only", "min_count"))
1111-
for method in ["median"]:
1112-
_add_downsample_kernel(method, ("numeric_only",))
1113-
for method in ["sem"]:
1114-
_add_downsample_kernel(method, ("ddof", "numeric_only"))
1115-
for method in ["ohlc"]:
1116-
_add_downsample_kernel(method, ())
1117-
for method in ["nunique"]:
1118-
_add_downsample_kernel(method, (), SeriesGroupBy)
1109+
for _method in ["sum", "prod", "min", "max", "first", "last"]:
1110+
_add_downsample_kernel(_method, ("numeric_only", "min_count"))
1111+
for _method in ["median"]:
1112+
_add_downsample_kernel(_method, ("numeric_only",))
1113+
for _method in ["sem"]:
1114+
_add_downsample_kernel(_method, ("ddof", "numeric_only"))
1115+
for _method in ["ohlc"]:
1116+
_add_downsample_kernel(_method, ())
1117+
for _method in ["nunique"]:
1118+
_add_downsample_kernel(_method, (), SeriesGroupBy)
11191119

11201120

11211121
class _GroupByMixin(PandasObject):

0 commit comments

Comments
 (0)