Skip to content

Commit d3c595e

Browse files
authored
ENH: Set __module__ on StringDtype (#60261)
1 parent b434476 commit d3c595e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pandas/core/arrays/string_.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
pa_version_under10p1,
2929
)
3030
from pandas.compat.numpy import function as nv
31-
from pandas.util._decorators import doc
31+
from pandas.util._decorators import (
32+
doc,
33+
set_module,
34+
)
3235
from pandas.util._exceptions import find_stack_level
3336

3437
from pandas.core.dtypes.base import (
@@ -86,6 +89,7 @@
8689
from pandas import Series
8790

8891

92+
@set_module("pandas")
8993
@register_extension_dtype
9094
class StringDtype(StorageExtensionDtype):
9195
"""

pandas/tests/api/test_api.py

+1
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ def test_set_module():
405405
assert pd.IntervalDtype.__module__ == "pandas"
406406
assert pd.SparseDtype.__module__ == "pandas"
407407
assert pd.ArrowDtype.__module__ == "pandas"
408+
assert pd.StringDtype.__module__ == "pandas"
408409
assert pd.Index.__module__ == "pandas"
409410
assert pd.CategoricalIndex.__module__ == "pandas"
410411
assert pd.DatetimeIndex.__module__ == "pandas"

0 commit comments

Comments
 (0)