From 8e21d7ba30736a1ad49ea52ca50617530dcff371 Mon Sep 17 00:00:00 2001 From: Xen0Xys Date: Thu, 16 May 2024 09:42:42 +0200 Subject: [PATCH] :bug: Fix string usage when regions is not installed --- src/ipyaladin/region_converter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ipyaladin/region_converter.py b/src/ipyaladin/region_converter.py index 95e8d6d0..8defb093 100644 --- a/src/ipyaladin/region_converter.py +++ b/src/ipyaladin/region_converter.py @@ -214,6 +214,7 @@ def __init__(self, region: Union[str, Region]) -> None: "PolygonSkyRegion": self._from_polygon_sky_region, "RectangleSkyRegion": self._from_rectangle_sky_region, } + self.options = {} self.from_region(region) def from_region(self, region: Union[str, Region]) -> None: @@ -229,7 +230,7 @@ def from_region(self, region: Union[str, Region]) -> None: raise ValueError(f"Unsupported region type: {type(region).__name__}") region_parser = self._region_parsers[type(region).__name__] region_parser(region) - if isinstance(region, Region): + if not isinstance(region, str): self._parse_visuals(region) def _from_stcs(self, stcs: str) -> None: