Skip to content

Commit 6de9b6b

Browse files
committed
Merge contour_px < 2 rejection into single branch
1 parent 9e679c7 commit 6de9b6b

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/spatialdata_plot/pl/utils.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,14 +2368,11 @@ def _type_check_params(param_dict: dict[str, Any], element_type: str) -> dict[st
23682368
else:
23692369
param_dict["outline_color"] = Color(outline_color)
23702370

2371-
if contour_px is not None:
2372-
if contour_px <= 0:
2373-
raise ValueError("Parameter 'contour_px' must be a positive number.")
2374-
if contour_px == 1:
2375-
raise ValueError(
2376-
"Parameter 'contour_px' must be >= 2; contour_px=1 produces no visible outline "
2377-
"(a 1x1 erosion is the identity transformation)."
2378-
)
2371+
if contour_px is not None and contour_px < 2:
2372+
raise ValueError(
2373+
"Parameter 'contour_px' must be >= 2; values below 2 produce no visible outline "
2374+
"(a 1x1 erosion is the identity transformation)."
2375+
)
23792376

23802377
alpha = param_dict.get("alpha")
23812378
if alpha is not None:

0 commit comments

Comments
 (0)