@@ -30,38 +30,21 @@ class IntegerDtype(ExtensionDtype):
3030
3131 @classmethod
3232 def construct_from_string (cls , string ):
33- if string == cls .name :
34- return cls ()
35- else :
36- raise TypeError ("Cannot construct a '{}' from "
37- "'{}'" .format (cls , string ))
38-
39- @classmethod
40- def construct_from_string_strict (cls , string ):
4133 """
42- Strict construction from a string, raise a TypeError if not
34+ Construction from a string, raise a TypeError if not
4335 possible
4436 """
45- if string [0 ] == 'I' :
46- return cls .construct_from_string (string )
47- raise TypeError ("could not construct PeriodDtype" )
37+ if string == cls .name :
38+ return cls ()
39+ raise TypeError ("Cannot construct a '{}' from "
40+ "'{}'" .format (cls , string ))
4841
4942
5043class UnsignedIntegerDtype (IntegerDtype ):
5144 kind = 'u'
5245 is_signed_integer = False
5346 is_unsigned_integer = True
5447
55- @classmethod
56- def construct_from_string_strict (cls , string ):
57- """
58- Strict construction from a string, raise a TypeError if not
59- possible
60- """
61- if string [0 ] == 'U' :
62- return cls .construct_from_string (string )
63- raise TypeError ("could not construct PeriodDtype" )
64-
6548
6649def to_integer_array (values ):
6750 """
@@ -457,7 +440,7 @@ class UnsignedIntegerArray(IntegerArray):
457440 setattr (module , classname , dtype_type )
458441
459442 # register
460- registry .register (dtype_type , dtype_type . construct_from_string_strict )
443+ registry .register (dtype_type )
461444
462445
463446# create the Array
0 commit comments