File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def construct_array_type(cls) -> type_t[ExtensionArray]:
213213 raise NotImplementedError
214214
215215 @classmethod
216- def construct_from_string (cls , string : str ) -> ExtensionDtype :
216+ def construct_from_string (cls , string : str ):
217217 r"""
218218 Construct this type from a string.
219219
@@ -424,7 +424,7 @@ def register(self, dtype: type[ExtensionDtype]) -> None:
424424
425425 self .dtypes .append (dtype )
426426
427- def find (self , dtype : type [E ] | E | str ) -> type [E ] | E | ExtensionDtype | None :
427+ def find (self , dtype : type [ExtensionDtype ] | str ) -> type [ExtensionDtype ] | None :
428428 """
429429 Parameters
430430 ----------
@@ -435,9 +435,8 @@ def find(self, dtype: type[E] | E | str) -> type[E] | E | ExtensionDtype | None:
435435 return the first matching dtype, otherwise return None
436436 """
437437 if not isinstance (dtype , str ):
438- if isinstance (dtype , type ):
439- dtype_type = dtype
440- else :
438+ dtype_type = dtype
439+ if not isinstance (dtype , type ):
441440 dtype_type = type (dtype )
442441 if issubclass (dtype_type , ExtensionDtype ):
443442 return dtype
You can’t perform that action at this time.
0 commit comments