diff --git a/pandas/core/arrays/string_.py b/pandas/core/arrays/string_.py index de129df2575d3..9b1f986a7158e 100644 --- a/pandas/core/arrays/string_.py +++ b/pandas/core/arrays/string_.py @@ -28,7 +28,10 @@ pa_version_under10p1, ) from pandas.compat.numpy import function as nv -from pandas.util._decorators import doc +from pandas.util._decorators import ( + doc, + set_module, +) from pandas.util._exceptions import find_stack_level from pandas.core.dtypes.base import ( @@ -86,6 +89,7 @@ from pandas import Series +@set_module("pandas") @register_extension_dtype class StringDtype(StorageExtensionDtype): """ diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index 25285a451bb3f..00b0236c236c0 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -405,6 +405,7 @@ def test_set_module(): assert pd.IntervalDtype.__module__ == "pandas" assert pd.SparseDtype.__module__ == "pandas" assert pd.ArrowDtype.__module__ == "pandas" + assert pd.StringDtype.__module__ == "pandas" assert pd.Index.__module__ == "pandas" assert pd.CategoricalIndex.__module__ == "pandas" assert pd.DatetimeIndex.__module__ == "pandas"