File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 28
28
)
29
29
30
30
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
38
32
39
33
40
34
@register_extension_dtype
@@ -80,7 +74,7 @@ def __init__(
80
74
context = None ,
81
75
) -> None :
82
76
for i , val in enumerate (values ):
83
- if is_float (val ):
77
+ if dtypes_common . is_float (val ):
84
78
if np .isnan (val ):
85
79
values [i ] = DecimalDtype ().na_value
86
80
else :
@@ -193,10 +187,10 @@ def copy(self) -> DecimalArray:
193
187
return type (self )(self ._data .copy (), dtype = self .dtype )
194
188
195
189
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]
197
191
if not copy :
198
192
return self
199
- dtype = pandas_dtype (dtype )
193
+ dtype = dtypes_common . pandas_dtype (dtype )
200
194
if isinstance (dtype , type (self .dtype )):
201
195
return type (self )(self ._data , copy = copy , context = dtype .context )
202
196
You can’t perform that action at this time.
0 commit comments