Skip to content

Commit 2696766

Browse files
committed
Use MutableMappingt to allow pop
1 parent c963072 commit 2696766

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/spatialdata_io/readers/visium_hd.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from spatialdata_io.readers._utils._utils import _set_reader_metadata
3535

3636
if TYPE_CHECKING:
37-
from collections.abc import Mapping
37+
from collections.abc import Mapping, MutableMapping
3838

3939
from anndata import AnnData
4040
from multiscale_spatial_image import MultiscaleSpatialImage
@@ -58,7 +58,7 @@ def visium_hd(
5858
load_all_images: bool = False,
5959
var_names_make_unique: bool = True,
6060
imread_kwargs: Mapping[str, Any] = MappingProxyType({}),
61-
image_models_kwargs: Mapping[str, Any] = MappingProxyType({}),
61+
image_models_kwargs: MutableMapping[str, Any] | None = None,
6262
anndata_kwargs: Mapping[str, Any] = MappingProxyType({}),
6363
) -> SpatialData:
6464
"""Read *10x Genomics* Visium HD formatted dataset.
@@ -118,6 +118,8 @@ def visium_hd(
118118
shapes = {}
119119
images: dict[str, Any] = {}
120120
labels: dict[str, Any] = {}
121+
if image_models_kwargs is None:
122+
image_models_kwargs = {}
121123

122124
# Deprecation warning for load_segmentations_only default value
123125
if load_segmentations_only is None:

0 commit comments

Comments
 (0)