Skip to content

Commit 544d6f8

Browse files
committed
STYLE: remove use in pd.api.dtype in decimal/array.py (pandas-dev#39203)
1 parent 058e1ae commit 544d6f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tests/extension/decimal/array.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from pandas.core.arraylike import OpsMixin
1515
from pandas.core.arrays import ExtensionArray, ExtensionScalarOpsMixin
1616
from pandas.core.indexers import check_array_indexer
17+
from pandas.api.types import is_scalar
1718

1819

1920
@register_extension_dtype
@@ -142,8 +143,8 @@ def astype(self, dtype, copy=True):
142143
return super().astype(dtype, copy=copy)
143144

144145
def __setitem__(self, key, value):
145-
if pd.api.types.is_list_like(value):
146-
if pd.api.types.is_scalar(key):
146+
if is_list_like(value):
147+
if is_scalar(key):
147148
raise ValueError("setting an array element with a sequence.")
148149
value = [decimal.Decimal(v) for v in value]
149150
else:

0 commit comments

Comments
 (0)