Skip to content

Commit

Permalink
removed | in favor of Union in single dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMarconato committed Oct 10, 2023
1 parent a0e26ba commit 184dd82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/spatialdata/_core/data_extent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 184dd82

Please sign in to comment.