diff --git a/pandas/tests/dtypes/test_inference.py b/pandas/tests/dtypes/test_inference.py index cfa6304909bb7..60afd768195d9 100644 --- a/pandas/tests/dtypes/test_inference.py +++ b/pandas/tests/dtypes/test_inference.py @@ -75,7 +75,7 @@ def coerce(request): (iter([1, 2]), True, "iterator"), # noqa: E241 (iter([]), True, "iterator-empty"), # noqa: E241 ((x for x in [1, 2]), True, "generator"), # noqa: E241 - ((x for x in []), True, "generator-empty"), # noqa: E241 + ((_ for _ in []), True, "generator-empty"), # noqa: E241 (Series([1]), True, "Series"), # noqa: E241 (Series([]), True, "Series-empty"), # noqa: E241 (Series(["a"]).str, True, "StringMethods"), # noqa: E241 @@ -288,7 +288,10 @@ class MockFile: assert not is_file(data) -@pytest.mark.parametrize("ll", [collections.namedtuple("Test", list("abc"))(1, 2, 3)]) +test_tuple = collections.namedtuple("Test", ["a", "b", "c"]) + + +@pytest.mark.parametrize("ll", [test_tuple(1, 2, 3)]) def test_is_names_tuple_passes(ll): assert inference.is_named_tuple(ll) diff --git a/setup.cfg b/setup.cfg index 26aab29f025a0..5dd4309ede6a3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -146,9 +146,6 @@ ignore_errors=True ignore_errors=True -[mypy-pandas.tests.dtypes.test_inference] -ignore_errors=True - [mypy-pandas.tests.extension.decimal.test_decimal] ignore_errors=True