Skip to content

Commit 47c837d

Browse files
committed
fixup
1 parent 2d99892 commit 47c837d

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/extension/decimal/array.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,7 @@
2828
)
2929

3030
from pandas.core.dtypes.base import ExtensionDtype
31-
from pandas.core.dtypes.common import (
32-
is_dtype_equal, # pyright: ignore[reportAttributeAccessIssue]
33-
)
34-
from pandas.core.dtypes.common import ( # type: ignore[attr-defined]
35-
is_float,
36-
pandas_dtype,
37-
)
31+
import pandas.core.dtypes.common as dtypes_common
3832

3933

4034
@register_extension_dtype
@@ -80,7 +74,7 @@ def __init__(
8074
context=None,
8175
) -> None:
8276
for i, val in enumerate(values):
83-
if is_float(val):
77+
if dtypes_common.is_float(val):
8478
if np.isnan(val):
8579
values[i] = DecimalDtype().na_value
8680
else:
@@ -193,10 +187,10 @@ def copy(self) -> DecimalArray:
193187
return type(self)(self._data.copy(), dtype=self.dtype)
194188

195189
def astype(self, dtype, copy=True):
196-
if is_dtype_equal(dtype, self._dtype):
190+
if dtypes_common.is_dtype_equal(dtype, self._dtype): # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue]
197191
if not copy:
198192
return self
199-
dtype = pandas_dtype(dtype)
193+
dtype = dtypes_common.pandas_dtype(dtype)
200194
if isinstance(dtype, type(self.dtype)):
201195
return type(self)(self._data, copy=copy, context=dtype.context)
202196

0 commit comments

Comments
 (0)