Skip to content

Fix render_labels silently accepting fill_alpha=0 and outline_alpha=0#644

Merged
timtreis merged 1 commit intomainfrom
fix/issue-630-labels-zero-alpha
May 8, 2026
Merged

Fix render_labels silently accepting fill_alpha=0 and outline_alpha=0#644
timtreis merged 1 commit intomainfrom
fix/issue-630-labels-zero-alpha

Conversation

@timtreis
Copy link
Copy Markdown
Member

@timtreis timtreis commented May 8, 2026

Summary

@timtreis timtreis changed the title Fix render_labels silently accepting fill_alpha=0 and outline_alpha=0 (#630) Fix render_labels silently accepting fill_alpha=0 and outline_alpha=0 May 8, 2026
…=0 and outline_alpha=0 (#630)

The dispatch chain's first branch matched `fill_alpha == outline_alpha`,
routing the (0, 0) case to the fill-only path with alpha=0 and leaving
the existing ValueError as dead code. Add an explicit guard so the
error is actually raised.
@timtreis timtreis force-pushed the fix/issue-630-labels-zero-alpha branch from 69b83f5 to 65281f6 Compare May 8, 2026 10:31
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.35%. Comparing base (072f04e) to head (65281f6).

Files with missing lines Patch % Lines
src/spatialdata_plot/pl/render.py 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
- Coverage   76.39%   76.35%   -0.05%     
==========================================
  Files          11       11              
  Lines        3237     3239       +2     
  Branches      761      762       +1     
==========================================
  Hits         2473     2473              
- Misses        466      467       +1     
- Partials      298      299       +1     
Files with missing lines Coverage Δ
src/spatialdata_plot/pl/render.py 86.41% <0.00%> (-0.26%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timtreis timtreis merged commit 8e8c5e4 into main May 8, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render_labels(fill_alpha=0, outline_alpha=0) silently renders invisible labels instead of erroring

2 participants