Skip to content

STYLE: Enable Pylint useless-parent-delegation warning #49773

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 4 commits into from
Nov 23, 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
3 changes: 0 additions & 3 deletions pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,6 @@ def apply_str(self) -> DataFrame | Series:
class FrameRowApply(FrameApply):
axis: AxisInt = 0

def apply_broadcast(self, target: DataFrame) -> DataFrame:
return super().apply_broadcast(target)

@property
def series_generator(self):
return (self.obj._ixs(i, axis=1) for i in range(len(self.columns)))
Expand Down
1 change: 1 addition & 0 deletions pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def view(self, dtype: Literal["m8[ns]"]) -> TimedeltaArray:
def view(self, dtype: Dtype | None = ...) -> ArrayLike:
...

# pylint: disable-next=useless-parent-delegation
def view(self, dtype: Dtype | None = None) -> ArrayLike:
# we need to explicitly call super() method as long as the `@overload`s
# are present in this file.
Expand Down
1 change: 1 addition & 0 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,7 @@ def get_slice_bound(
label = (label,)
return self._partial_tup_index(label, side=side)

# pylint: disable-next=useless-parent-delegation
def slice_locs(self, start=None, end=None, step=None) -> tuple[int, int]:
"""
For an ordered MultiIndex, compute the slice locations for input
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ def mode(self, dropna: bool = True) -> Series:
res_values, index=range(len(res_values)), name=self.name
)

def unique(self) -> ArrayLike:
def unique(self) -> ArrayLike: # pylint: disable=useless-parent-delegation
"""
Return unique values of Series object.

Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/extension/decimal/test_decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ class TestCasting(base.BaseCastingTests):


class TestGroupby(base.BaseGroupbyTests):
def test_groupby_agg_extension(self, data_for_grouping):
super().test_groupby_agg_extension(data_for_grouping)
pass


class TestSetitem(base.BaseSetitemTests):
Expand Down
6 changes: 1 addition & 5 deletions pandas/tests/extension/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ def test_getitem_scalar(self, data):


class TestGroupby(BaseNumPyTests, base.BaseGroupbyTests):
def test_groupby_extension_apply(self, data_for_grouping, groupby_apply_op):
super().test_groupby_extension_apply(data_for_grouping, groupby_apply_op)
pass


class TestInterface(BaseNumPyTests, base.BaseInterfaceTests):
Expand Down Expand Up @@ -403,9 +402,6 @@ def test_setitem_scalar_key_sequence_raise(self, data):
def test_setitem_mask(self, data, mask, box_in_series):
super().test_setitem_mask(data, mask, box_in_series)

def test_setitem_mask_raises(self, data, box_in_series):
super().test_setitem_mask_raises(data, box_in_series)

@skip_nested
@pytest.mark.parametrize(
"idx",
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ disable = [
"unused-argument",
"unused-import",
"unused-variable",
"using-constant-test",
"useless-parent-delegation"
"using-constant-test"
]

[tool.pytest.ini_options]
Expand Down