@@ -62,46 +62,46 @@ def coerce(request):
62
62
# collect all objects to be tested for list-like-ness; use tuples of objects,
63
63
# whether they are list-like or not (special casing for sets), and their ID
64
64
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" ),
105
105
]
106
106
objs , expected , ids = zip (* ll_params )
107
107
0 commit comments