Skip to content

enable pylint:useless-return #49400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pandas/core/arrays/_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ def _fill_mask_inplace(
# (for now) when self.ndim == 2, we assume axis=0
func = missing.get_fill_func(method, ndim=self.ndim)
func(self._ndarray.T, limit=limit, mask=mask.T)
return

@doc(ExtensionArray.fillna)
def fillna(
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,6 @@ def _fill_mask_inplace(
func(npvalues, limit=limit, mask=mask.copy())
new_values = self._from_sequence(npvalues, dtype=self.dtype)
self[mask] = new_values[mask]
return

def _rank(
self,
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def interpolate_array_2d(
fill_value=fill_value,
**kwargs,
)
return


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


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

values[invalid] = np.nan

return


def interpolate_2d(
values: np.ndarray,
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/groupby/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def f_scalar(group):
def f_none(group):
# GH10519, GH12155, GH21417
names.append(group.name)
return None

def f_constant_df(group):
# GH2936, GH20084
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ disable = [
"unnecessary-list-index-lookup",
"use-a-generator",
"useless-option-value",
"useless-return",

# pylint type "W": warning, for python specific problems
"abstract-method",
Expand Down