diff --git a/apis/python/src/tiledbsoma/_factory.py b/apis/python/src/tiledbsoma/_factory.py index 4369145f0e..8ea66e5c46 100644 --- a/apis/python/src/tiledbsoma/_factory.py +++ b/apis/python/src/tiledbsoma/_factory.py @@ -28,6 +28,7 @@ _dense_nd_array, _experiment, _measurement, + _scene, _sparse_nd_array, _tdb_handles, _tiledb_object, @@ -219,12 +220,13 @@ def _type_name_to_cls(type_name: str) -> Type[AnyTileDBObject]: _experiment.Experiment, _measurement.Measurement, _sparse_nd_array.SparseNDArray, + _scene.Scene, ) } try: return type_map[type_name.lower()] except KeyError as ke: - options = sorted(type_map) + _options = sorted(type_map) raise SOMAError( - f"{type_name!r} is not a recognized SOMA type; expected one of {options}" + f"{type_name!r} is not a recognized SOMA type; expected one of {_options}" ) from ke diff --git a/apis/python/src/tiledbsoma/experimental/ingest.py b/apis/python/src/tiledbsoma/experimental/ingest.py index db147020a5..1069bab619 100644 --- a/apis/python/src/tiledbsoma/experimental/ingest.py +++ b/apis/python/src/tiledbsoma/experimental/ingest.py @@ -153,9 +153,7 @@ def from_visium( experiment, "spatial", spatial, use_relative_uri=use_relative_uri ) scene_uri = f"{spatial_uri}/{scene_name}" - with _create_or_open_collection( - Collection[Collection[AnyTileDBObject]], scene_uri, **ingest_ctx - ) as scene: + with _create_or_open_collection(Scene, scene_uri, **ingest_ctx) as scene: _maybe_set( spatial, scene_name, scene, use_relative_uri=use_relative_uri )