diff --git a/pandas/core/arrays/string_.py b/pandas/core/arrays/string_.py index 291cc2e62be62..e52dd1659793e 100644 --- a/pandas/core/arrays/string_.py +++ b/pandas/core/arrays/string_.py @@ -188,9 +188,7 @@ def construct_from_string(cls, string) -> Self: # https://github.com/pandas-dev/pandas/issues/36126 # error: Signature of "construct_array_type" incompatible with supertype # "ExtensionDtype" - def construct_array_type( # type: ignore[override] - self, - ) -> type_t[BaseStringArray]: + def construct_array_type(self) -> type_t[BaseStringArray]: """ Return the array type associated with this dtype. diff --git a/pandas/core/dtypes/base.py b/pandas/core/dtypes/base.py index d8a42d83b6c54..df74b5b31e0af 100644 --- a/pandas/core/dtypes/base.py +++ b/pandas/core/dtypes/base.py @@ -206,8 +206,7 @@ def names(self) -> list[str] | None: """ return None - @classmethod - def construct_array_type(cls) -> type_t[ExtensionArray]: + def construct_array_type(self) -> type_t[ExtensionArray]: """ Return the array type associated with this dtype. @@ -215,7 +214,7 @@ def construct_array_type(cls) -> type_t[ExtensionArray]: ------- type """ - raise AbstractMethodError(cls) + raise AbstractMethodError(self) def empty(self, shape: Shape) -> ExtensionArray: """