diff --git a/pandas-stubs/core/arrays/string_.pyi b/pandas-stubs/core/arrays/string_.pyi index 4ae56b77c..cdde9e028 100644 --- a/pandas-stubs/core/arrays/string_.pyi +++ b/pandas-stubs/core/arrays/string_.pyi @@ -7,7 +7,7 @@ from pandas._libs.missing import NAType from pandas.core.dtypes.base import ExtensionDtype class StringDtype(ExtensionDtype): - def __init__(self, storage: Literal["python", "pyarrow"] | None) -> None: ... + def __init__(self, storage: Literal["python", "pyarrow"] | None = None) -> None: ... @property def na_value(self) -> NAType: ... diff --git a/tests/test_dtypes.py b/tests/test_dtypes.py index 6792d2ba0..7fc8da847 100644 --- a/tests/test_dtypes.py +++ b/tests/test_dtypes.py @@ -126,6 +126,7 @@ def test_sparse_dtype() -> None: def test_string_dtype() -> None: s_dt = pd.StringDtype("pyarrow") + check(assert_type(pd.StringDtype(), pd.StringDtype), pd.StringDtype) check(assert_type(pd.StringDtype("pyarrow"), pd.StringDtype), pd.StringDtype) check(assert_type(pd.StringDtype("python"), pd.StringDtype), pd.StringDtype) check(assert_type(s_dt.na_value, NAType), NAType)