diff --git a/pandas/tests/extension/decimal/test_decimal.py b/pandas/tests/extension/decimal/test_decimal.py index c2e42ae2fe27e..acba1bd557351 100644 --- a/pandas/tests/extension/decimal/test_decimal.py +++ b/pandas/tests/extension/decimal/test_decimal.py @@ -284,6 +284,7 @@ def test_compare_array(self, data, comparison_op): class DecimalArrayWithoutFromSequence(DecimalArray): """Helper class for testing error handling in _from_sequence.""" + @classmethod def _from_sequence(cls, scalars, dtype=None, copy=False): raise KeyError("For the test") diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 1bfb85f369415..375f66d545ed4 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -1612,6 +1612,7 @@ class _TestSQLAlchemy(SQLAlchemyMixIn, PandasSQLTest): flavor: str + @classmethod @pytest.fixture(autouse=True, scope="class") def setup_class(cls): cls.setup_import() diff --git a/pandas/tests/scalar/period/test_period.py b/pandas/tests/scalar/period/test_period.py index c9e28f8249c1b..b5bd61854866d 100644 --- a/pandas/tests/scalar/period/test_period.py +++ b/pandas/tests/scalar/period/test_period.py @@ -840,6 +840,7 @@ def test_period_deprecated_freq(self): assert isinstance(p1, Period) assert isinstance(p2, Period) + @staticmethod def _period_constructor(bound, offset): return Period( year=bound.year, diff --git a/pyproject.toml b/pyproject.toml index 3e87d237170aa..02411464f5675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,6 @@ disable = [ "no-member", "no-method-argument", "no-name-in-module", - "no-self-argument", "no-value-for-parameter", "non-iterator-returned", "not-an-iterable",