From 1b0e63da7069726975f673761aeb38e385c054ec Mon Sep 17 00:00:00 2001 From: Pierrot Date: Mon, 20 Jun 2022 21:17:26 -0300 Subject: [PATCH] CLN: some simple code cleanup --- pandas/io/formats/excel.py | 2 +- pandas/tests/apply/test_series_apply.py | 2 +- pandas/tests/dtypes/test_inference.py | 2 +- pandas/tests/frame/test_constructors.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index effb0652aa2d3..80d1e03a97a4b 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -90,7 +90,7 @@ def __init__( ) style = css_converter(css) - return super().__init__(row=row, col=col, val=val, style=style, **kwargs) + super().__init__(row=row, col=col, val=val, style=style, **kwargs) class CSSToExcelConverter: diff --git a/pandas/tests/apply/test_series_apply.py b/pandas/tests/apply/test_series_apply.py index 69f7bebb63986..64feee7db7bb4 100644 --- a/pandas/tests/apply/test_series_apply.py +++ b/pandas/tests/apply/test_series_apply.py @@ -640,7 +640,7 @@ def test_map_abc_mapping_with_missing(non_dict_mapping_subclass): # https://github.com/pandas-dev/pandas/issues/29733 # Check collections.abc.Mapping support as mapper for Series.map class NonDictMappingWithMissing(non_dict_mapping_subclass): - def __missing__(key): + def __missing__(self, key): return "missing" s = Series([1, 2, 3]) diff --git a/pandas/tests/dtypes/test_inference.py b/pandas/tests/dtypes/test_inference.py index b12476deccbfc..9c84b63126fe4 100644 --- a/pandas/tests/dtypes/test_inference.py +++ b/pandas/tests/dtypes/test_inference.py @@ -236,7 +236,7 @@ def test_is_sequence(): assert not is_seq(np.int64) class A: - def __getitem__(self): + def __getitem__(self, item): return 1 assert not is_seq(A()) diff --git a/pandas/tests/frame/test_constructors.py b/pandas/tests/frame/test_constructors.py index f06641002e039..57defca1a4a75 100644 --- a/pandas/tests/frame/test_constructors.py +++ b/pandas/tests/frame/test_constructors.py @@ -1371,7 +1371,7 @@ def __init__(self, lst) -> None: def __getitem__(self, n): return self._lst.__getitem__(n) - def __len__(self, n): + def __len__(self): return self._lst.__len__() lst_containers = [DummyContainer([1, "a"]), DummyContainer([2, "b"])]