Skip to content

Commit 4b973c7

Browse files
make property in base class StorageExtensionDtype as well
1 parent 3d04e1d commit 4b973c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/core/dtypes/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ class StorageExtensionDtype(ExtensionDtype):
459459
_metadata = ("storage",)
460460

461461
def __init__(self, storage: str | None = None) -> None:
462-
self.storage = storage
462+
self._storage = storage
463463

464464
def __repr__(self) -> str:
465465
return f"{self.name}[{self.storage}]"
@@ -480,6 +480,10 @@ def __hash__(self) -> int:
480480
def na_value(self) -> libmissing.NAType:
481481
return libmissing.NA
482482

483+
@property
484+
def storage(self) -> str:
485+
return self._storage
486+
483487

484488
@set_module("pandas.api.extensions")
485489
def register_extension_dtype(cls: type_t[ExtensionDtypeT]) -> type_t[ExtensionDtypeT]:

0 commit comments

Comments
 (0)