Skip to content

Commit 31ef92f

Browse files
committed
consolidate return
1 parent 4445207 commit 31ef92f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/dtypes/common.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1262,13 +1262,11 @@ def np_issubclass_compat(unique_dtype, dtypes_set) -> bool:
12621262
>>> np_issubclass_compat(pd.Float64Dtype(), [np.number])
12631263
True
12641264
"""
1265-
if issubclass(unique_dtype.type, tuple(dtypes_set)) or (
1265+
return issubclass(unique_dtype.type, tuple(dtypes_set)) or (
12661266
np.number in dtypes_set
12671267
and hasattr(unique_dtype, "_is_numeric") # is an extensionarray
12681268
and unique_dtype._is_numeric
1269-
):
1270-
return True
1271-
return False
1269+
)
12721270

12731271

12741272
def is_numeric_dtype(arr_or_dtype) -> bool:

0 commit comments

Comments
 (0)