Skip to content

Commit 735c6b0

Browse files
enable pylint:useless-return (#49400)
* enable pylint:useless-return * fixup! enable pylint:useless-return Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent 0f8d9bf commit 735c6b0

File tree

5 files changed

+0
-8
lines changed

5 files changed

+0
-8
lines changed

pandas/core/arrays/_mixins.py

-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ def _fill_mask_inplace(
304304
# (for now) when self.ndim == 2, we assume axis=0
305305
func = missing.get_fill_func(method, ndim=self.ndim)
306306
func(self._ndarray.T, limit=limit, mask=mask.T)
307-
return
308307

309308
@doc(ExtensionArray.fillna)
310309
def fillna(

pandas/core/arrays/base.py

-1
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,6 @@ def _fill_mask_inplace(
15561556
func(npvalues, limit=limit, mask=mask.copy())
15571557
new_values = self._from_sequence(npvalues, dtype=self.dtype)
15581558
self[mask] = new_values[mask]
1559-
return
15601559

15611560
def _rank(
15621561
self,

pandas/core/missing.py

-4
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ def interpolate_array_2d(
258258
fill_value=fill_value,
259259
**kwargs,
260260
)
261-
return
262261

263262

264263
def _interpolate_2d_with_fill(
@@ -341,7 +340,6 @@ def func(yvalues: np.ndarray) -> None:
341340
# Sequence[Sequence[Sequence[_SupportsArray[dtype[<nothing>]]]]],
342341
# Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[<nothing>]]]]]]]]"
343342
np.apply_along_axis(func, axis, data) # type: ignore[arg-type]
344-
return
345343

346344

347345
def _index_to_interp_indices(index: Index, method: str) -> np.ndarray:
@@ -762,8 +760,6 @@ def _interpolate_with_limit_area(
762760

763761
values[invalid] = np.nan
764762

765-
return
766-
767763

768764
def interpolate_2d(
769765
values: np.ndarray,

pandas/tests/groupby/test_apply.py

-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def f_scalar(group):
151151
def f_none(group):
152152
# GH10519, GH12155, GH21417
153153
names.append(group.name)
154-
return None
155154

156155
def f_constant_df(group):
157156
# GH2936, GH20084

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ disable = [
135135
"unnecessary-list-index-lookup",
136136
"use-a-generator",
137137
"useless-option-value",
138-
"useless-return",
139138

140139
# pylint type "W": warning, for python specific problems
141140
"abstract-method",

0 commit comments

Comments
 (0)