From 184dd824a831ce902943a601f33bc582bc6c16b6 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Tue, 10 Oct 2023 17:36:28 +0200 Subject: [PATCH] removed | in favor of Union in single dispatch --- src/spatialdata/_core/data_extent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spatialdata/_core/data_extent.py b/src/spatialdata/_core/data_extent.py index 769a9ec4..5d5bc729 100644 --- a/src/spatialdata/_core/data_extent.py +++ b/src/spatialdata/_core/data_extent.py @@ -12,6 +12,7 @@ from shapely import MultiPolygon, Point, Polygon from spatial_image import SpatialImage from xarray import DataArray +from typing import Union from spatialdata._core.operations.transform import transform from spatialdata._core.spatialdata import SpatialData @@ -114,7 +115,7 @@ def get_extent( has_labels: bool = True, has_points: bool = True, has_shapes: bool = True, - elements: list[str] | None = None, + elements: Union[list[str], None] = None, ) -> BoundingBoxDescription: """ Get the extent (bounding box) of a SpatialData object or a SpatialElement. @@ -176,7 +177,7 @@ def _( has_labels: bool = True, has_points: bool = True, has_shapes: bool = True, - elements: list[str] | None = None, + elements: Union[list[str], None] = None, ) -> BoundingBoxDescription: """ Get the extent (bounding box) of a SpatialData object: the extent of the union of the extents of all its elements.