@@ -106,7 +106,7 @@ def _get_common_dtype(self, dtypes: List[DtypeObj]) -> Optional[DtypeObj]:
106
106
[t .numpy_dtype if isinstance (t , BaseMaskedDtype ) else t for t in dtypes ], []
107
107
)
108
108
if np .issubdtype (np_dtype , np .integer ):
109
- return _dtypes [str (np_dtype )]
109
+ return STR_TO_DTYPE [str (np_dtype )]
110
110
return None
111
111
112
112
def __from_arrow__ (
@@ -214,7 +214,7 @@ def coerce_to_array(
214
214
215
215
if not issubclass (type (dtype ), _IntegerDtype ):
216
216
try :
217
- dtype = _dtypes [str (np .dtype (dtype ))]
217
+ dtype = STR_TO_DTYPE [str (np .dtype (dtype ))]
218
218
except KeyError as err :
219
219
raise ValueError (f"invalid dtype specified { dtype } " ) from err
220
220
@@ -354,7 +354,7 @@ class IntegerArray(BaseMaskedArray):
354
354
355
355
@cache_readonly
356
356
def dtype (self ) -> _IntegerDtype :
357
- return _dtypes [str (self ._data .dtype )]
357
+ return STR_TO_DTYPE [str (self ._data .dtype )]
358
358
359
359
def __init__ (self , values : np .ndarray , mask : np .ndarray , copy : bool = False ):
360
360
if not (isinstance (values , np .ndarray ) and values .dtype .kind in ["i" , "u" ]):
@@ -735,7 +735,7 @@ class UInt64Dtype(_IntegerDtype):
735
735
__doc__ = _dtype_docstring .format (dtype = "uint64" )
736
736
737
737
738
- _dtypes : Dict [str , _IntegerDtype ] = {
738
+ STR_TO_DTYPE : Dict [str , _IntegerDtype ] = {
739
739
"int8" : Int8Dtype (),
740
740
"int16" : Int16Dtype (),
741
741
"int32" : Int32Dtype (),
0 commit comments