Skip to content

Clean up noqa E241 #29207

Closed
Closed
@WillAyd

Description

@WillAyd

Since we use black some of the whitespace codes for flake8 might not be applicable anymore. E241 in particular, which is for multiple spaces after a comma I don't think should appear anymore

A quick grep shows the following - if anyone would like to clean these up by deleting the noqa should make for an easy contributing I think

$ grep "# noqa: E241" -r pandas --include="*.py"
pandas/tests/dtypes/test_inference.py:    ([1], True, "list"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ([], True, "list-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ((1,), True, "tuple"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (tuple(), True, "tuple-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ({"a": 1}, True, "dict"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (dict(), True, "dict-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ({"a", 1}, "set", "set"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (set(), "set", "set-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (frozenset({"a", 1}), "set", "frozenset"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (frozenset(), "set", "frozenset-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (iter([1, 2]), True, "iterator"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (iter([]), True, "iterator-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ((x for x in [1, 2]), True, "generator"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ((_ for _ in []), True, "generator-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (Series([1]), True, "Series"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (Series([]), True, "Series-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (Series(["a"]).str, True, "StringMethods"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (Series([], dtype="O").str, True, "StringMethods-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (Index([1]), True, "Index"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (Index([]), True, "Index-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (DataFrame([[1]]), True, "DataFrame"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (DataFrame(), True, "DataFrame-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.ndarray((2,) * 1), True, "ndarray-1d"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.array([]), True, "ndarray-1d-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.ndarray((2,) * 2), True, "ndarray-2d"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.array([[]]), True, "ndarray-2d-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.ndarray((2,) * 3), True, "ndarray-3d"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.array([[[]]]), True, "ndarray-3d-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.ndarray((2,) * 4), True, "ndarray-4d"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.array([[[[]]]]), True, "ndarray-4d-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.array(2), False, "ndarray-0d"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (1, False, "int"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (b"123", False, "bytes"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (b"", False, "bytes-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ("123", False, "string"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    ("", False, "string-empty"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (str, False, "string-type"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (object(), False, "object"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (np.nan, False, "NaN"),  # noqa: E241
pandas/tests/dtypes/test_inference.py:    (None, False, "None"),  # noqa: E241
pandas/tests/test_strings.py:    ("contains", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("count", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("decode", ("UTF-8",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("encode", ("UTF-8",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("endswith", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("extract", ("([a-z]*)",), {"expand": False}),  # noqa: E241
pandas/tests/test_strings.py:    ("extract", ("([a-z]*)",), {"expand": True}),  # noqa: E241
pandas/tests/test_strings.py:    ("extractall", ("([a-z]*)",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("find", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("findall", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("get", (0,), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("index", ("",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("join", (",",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("ljust", (10,), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("match", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("normalize", ("NFC",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("pad", (10,), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("partition", (" ",), {"expand": False}),  # noqa: E241
pandas/tests/test_strings.py:    ("partition", (" ",), {"expand": True}),  # noqa: E241
pandas/tests/test_strings.py:    ("repeat", (3,), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("replace", ("a", "z"), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("rfind", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("rindex", ("",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("rjust", (10,), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("rpartition", (" ",), {"expand": False}),  # noqa: E241
pandas/tests/test_strings.py:    ("rpartition", (" ",), {"expand": True}),  # noqa: E241
pandas/tests/test_strings.py:    ("slice", (0, 1), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("slice_replace", (0, 1, "z"), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("split", (" ",), {"expand": False}),  # noqa: E241
pandas/tests/test_strings.py:    ("split", (" ",), {"expand": True}),  # noqa: E241
pandas/tests/test_strings.py:    ("startswith", ("a",), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("translate", ({97: 100},), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("wrap", (2,), {}),  # noqa: E241
pandas/tests/test_strings.py:    ("zfill", (10,), {}),  # noqa: E241

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions