Skip to content

Commit f4a2c8c

Browse files
committed
Use not results
1 parent e97ad97 commit f4a2c8c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pandas/core/arrays/boolean.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __from_arrow__(
126126
bool_arr = BooleanArray._from_sequence(np.array(arr))
127127
results.append(bool_arr)
128128

129-
if len(results) == 0:
129+
if not results:
130130
return BooleanArray(
131131
np.array([], dtype=np.bool_), np.array([], dtype=np.bool_)
132132
)

pandas/core/arrays/numeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __from_arrow__(
6666
num_arr = array_class(data.copy(), ~mask, copy=False)
6767
results.append(num_arr)
6868

69-
if len(results) == 0:
69+
if not results:
7070
return array_class(
7171
np.array([], dtype=self.numpy_dtype), np.array([], dtype=np.bool_)
7272
)

pandas/core/arrays/string_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __from_arrow__(
118118
str_arr = StringArray._from_sequence(np.array(arr))
119119
results.append(str_arr)
120120

121-
if len(results) > 0:
121+
if results:
122122
return StringArray._concat_same_type(results)
123123
else:
124124
return StringArray(np.array([], dtype="object"))

0 commit comments

Comments
 (0)