Skip to content

Commit 34de308

Browse files
kaathi524TomAugspurger
authored andcommitted
CLN: remove noqa E241 #29207 (#29209)
1 parent e3698dc commit 34de308

File tree

2 files changed

+77
-77
lines changed

2 files changed

+77
-77
lines changed

pandas/tests/dtypes/test_inference.py

+40-40
Original file line numberDiff line numberDiff line change
@@ -62,46 +62,46 @@ def coerce(request):
6262
# collect all objects to be tested for list-like-ness; use tuples of objects,
6363
# whether they are list-like or not (special casing for sets), and their ID
6464
ll_params = [
65-
([1], True, "list"), # noqa: E241
66-
([], True, "list-empty"), # noqa: E241
67-
((1,), True, "tuple"), # noqa: E241
68-
(tuple(), True, "tuple-empty"), # noqa: E241
69-
({"a": 1}, True, "dict"), # noqa: E241
70-
(dict(), True, "dict-empty"), # noqa: E241
71-
({"a", 1}, "set", "set"), # noqa: E241
72-
(set(), "set", "set-empty"), # noqa: E241
73-
(frozenset({"a", 1}), "set", "frozenset"), # noqa: E241
74-
(frozenset(), "set", "frozenset-empty"), # noqa: E241
75-
(iter([1, 2]), True, "iterator"), # noqa: E241
76-
(iter([]), True, "iterator-empty"), # noqa: E241
77-
((x for x in [1, 2]), True, "generator"), # noqa: E241
78-
((_ for _ in []), True, "generator-empty"), # noqa: E241
79-
(Series([1]), True, "Series"), # noqa: E241
80-
(Series([]), True, "Series-empty"), # noqa: E241
81-
(Series(["a"]).str, True, "StringMethods"), # noqa: E241
82-
(Series([], dtype="O").str, True, "StringMethods-empty"), # noqa: E241
83-
(Index([1]), True, "Index"), # noqa: E241
84-
(Index([]), True, "Index-empty"), # noqa: E241
85-
(DataFrame([[1]]), True, "DataFrame"), # noqa: E241
86-
(DataFrame(), True, "DataFrame-empty"), # noqa: E241
87-
(np.ndarray((2,) * 1), True, "ndarray-1d"), # noqa: E241
88-
(np.array([]), True, "ndarray-1d-empty"), # noqa: E241
89-
(np.ndarray((2,) * 2), True, "ndarray-2d"), # noqa: E241
90-
(np.array([[]]), True, "ndarray-2d-empty"), # noqa: E241
91-
(np.ndarray((2,) * 3), True, "ndarray-3d"), # noqa: E241
92-
(np.array([[[]]]), True, "ndarray-3d-empty"), # noqa: E241
93-
(np.ndarray((2,) * 4), True, "ndarray-4d"), # noqa: E241
94-
(np.array([[[[]]]]), True, "ndarray-4d-empty"), # noqa: E241
95-
(np.array(2), False, "ndarray-0d"), # noqa: E241
96-
(1, False, "int"), # noqa: E241
97-
(b"123", False, "bytes"), # noqa: E241
98-
(b"", False, "bytes-empty"), # noqa: E241
99-
("123", False, "string"), # noqa: E241
100-
("", False, "string-empty"), # noqa: E241
101-
(str, False, "string-type"), # noqa: E241
102-
(object(), False, "object"), # noqa: E241
103-
(np.nan, False, "NaN"), # noqa: E241
104-
(None, False, "None"), # noqa: E241
65+
([1], True, "list"),
66+
([], True, "list-empty"),
67+
((1,), True, "tuple"),
68+
(tuple(), True, "tuple-empty"),
69+
({"a": 1}, True, "dict"),
70+
(dict(), True, "dict-empty"),
71+
({"a", 1}, "set", "set"),
72+
(set(), "set", "set-empty"),
73+
(frozenset({"a", 1}), "set", "frozenset"),
74+
(frozenset(), "set", "frozenset-empty"),
75+
(iter([1, 2]), True, "iterator"),
76+
(iter([]), True, "iterator-empty"),
77+
((x for x in [1, 2]), True, "generator"),
78+
((_ for _ in []), True, "generator-empty"),
79+
(Series([1]), True, "Series"),
80+
(Series([]), True, "Series-empty"),
81+
(Series(["a"]).str, True, "StringMethods"),
82+
(Series([], dtype="O").str, True, "StringMethods-empty"),
83+
(Index([1]), True, "Index"),
84+
(Index([]), True, "Index-empty"),
85+
(DataFrame([[1]]), True, "DataFrame"),
86+
(DataFrame(), True, "DataFrame-empty"),
87+
(np.ndarray((2,) * 1), True, "ndarray-1d"),
88+
(np.array([]), True, "ndarray-1d-empty"),
89+
(np.ndarray((2,) * 2), True, "ndarray-2d"),
90+
(np.array([[]]), True, "ndarray-2d-empty"),
91+
(np.ndarray((2,) * 3), True, "ndarray-3d"),
92+
(np.array([[[]]]), True, "ndarray-3d-empty"),
93+
(np.ndarray((2,) * 4), True, "ndarray-4d"),
94+
(np.array([[[[]]]]), True, "ndarray-4d-empty"),
95+
(np.array(2), False, "ndarray-0d"),
96+
(1, False, "int"),
97+
(b"123", False, "bytes"),
98+
(b"", False, "bytes-empty"),
99+
("123", False, "string"),
100+
("", False, "string-empty"),
101+
(str, False, "string-type"),
102+
(object(), False, "object"),
103+
(np.nan, False, "NaN"),
104+
(None, False, "None"),
105105
]
106106
objs, expected, ids = zip(*ll_params)
107107

pandas/tests/test_strings.py

+37-37
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,46 @@ def assert_series_or_index_equal(left, right):
2121

2222

2323
_any_string_method = [
24-
("cat", (), {"sep": ","}), # noqa: E241
25-
("cat", (Series(list("zyx")),), {"sep": ",", "join": "left"}), # noqa: E241
26-
("center", (10,), {}), # noqa: E241
27-
("contains", ("a",), {}), # noqa: E241
28-
("count", ("a",), {}), # noqa: E241
29-
("decode", ("UTF-8",), {}), # noqa: E241
30-
("encode", ("UTF-8",), {}), # noqa: E241
31-
("endswith", ("a",), {}), # noqa: E241
32-
("extract", ("([a-z]*)",), {"expand": False}), # noqa: E241
33-
("extract", ("([a-z]*)",), {"expand": True}), # noqa: E241
34-
("extractall", ("([a-z]*)",), {}), # noqa: E241
35-
("find", ("a",), {}), # noqa: E241
36-
("findall", ("a",), {}), # noqa: E241
37-
("get", (0,), {}), # noqa: E241
24+
("cat", (), {"sep": ","}),
25+
("cat", (Series(list("zyx")),), {"sep": ",", "join": "left"}),
26+
("center", (10,), {}),
27+
("contains", ("a",), {}),
28+
("count", ("a",), {}),
29+
("decode", ("UTF-8",), {}),
30+
("encode", ("UTF-8",), {}),
31+
("endswith", ("a",), {}),
32+
("extract", ("([a-z]*)",), {"expand": False}),
33+
("extract", ("([a-z]*)",), {"expand": True}),
34+
("extractall", ("([a-z]*)",), {}),
35+
("find", ("a",), {}),
36+
("findall", ("a",), {}),
37+
("get", (0,), {}),
3838
# because "index" (and "rindex") fail intentionally
3939
# if the string is not found, search only for empty string
40-
("index", ("",), {}), # noqa: E241
41-
("join", (",",), {}), # noqa: E241
42-
("ljust", (10,), {}), # noqa: E241
43-
("match", ("a",), {}), # noqa: E241
44-
("normalize", ("NFC",), {}), # noqa: E241
45-
("pad", (10,), {}), # noqa: E241
46-
("partition", (" ",), {"expand": False}), # noqa: E241
47-
("partition", (" ",), {"expand": True}), # noqa: E241
48-
("repeat", (3,), {}), # noqa: E241
49-
("replace", ("a", "z"), {}), # noqa: E241
50-
("rfind", ("a",), {}), # noqa: E241
51-
("rindex", ("",), {}), # noqa: E241
52-
("rjust", (10,), {}), # noqa: E241
53-
("rpartition", (" ",), {"expand": False}), # noqa: E241
54-
("rpartition", (" ",), {"expand": True}), # noqa: E241
55-
("slice", (0, 1), {}), # noqa: E241
56-
("slice_replace", (0, 1, "z"), {}), # noqa: E241
57-
("split", (" ",), {"expand": False}), # noqa: E241
58-
("split", (" ",), {"expand": True}), # noqa: E241
59-
("startswith", ("a",), {}), # noqa: E241
40+
("index", ("",), {}),
41+
("join", (",",), {}),
42+
("ljust", (10,), {}),
43+
("match", ("a",), {}),
44+
("normalize", ("NFC",), {}),
45+
("pad", (10,), {}),
46+
("partition", (" ",), {"expand": False}),
47+
("partition", (" ",), {"expand": True}),
48+
("repeat", (3,), {}),
49+
("replace", ("a", "z"), {}),
50+
("rfind", ("a",), {}),
51+
("rindex", ("",), {}),
52+
("rjust", (10,), {}),
53+
("rpartition", (" ",), {"expand": False}),
54+
("rpartition", (" ",), {"expand": True}),
55+
("slice", (0, 1), {}),
56+
("slice_replace", (0, 1, "z"), {}),
57+
("split", (" ",), {"expand": False}),
58+
("split", (" ",), {"expand": True}),
59+
("startswith", ("a",), {}),
6060
# translating unicode points of "a" to "d"
61-
("translate", ({97: 100},), {}), # noqa: E241
62-
("wrap", (2,), {}), # noqa: E241
63-
("zfill", (10,), {}), # noqa: E241
61+
("translate", ({97: 100},), {}),
62+
("wrap", (2,), {}),
63+
("zfill", (10,), {}),
6464
] + list(
6565
zip(
6666
[

0 commit comments

Comments
 (0)