Skip to content

fix(scalebar): accept int for scalebar_dx#753

Merged
timtreis merged 1 commit into
mainfrom
fix/scalebar-accepts-int
Jul 10, 2026
Merged

fix(scalebar): accept int for scalebar_dx#753
timtreis merged 1 commit into
mainfrom
fix/scalebar-accepts-int

Conversation

@timtreis

@timtreis timtreis commented Jul 10, 2026

Copy link
Copy Markdown
Member

Problem

scalebar_dx rejected plain int values even though validation allowed them.

_validate accepts int | float for scalebar_dx, but _get_scalebar narrowed to float only via _get_list(..., _type=float). So pl.show(scalebar_dx=100) passed validation and then raised:

ValueError: Can't make a list from variable: `100`

_validate accepted int | float for scalebar_dx, but _get_scalebar
narrowed to float via _get_list(..., _type=float), so an int value
passed validation then raised 'Can't make a list from variable'.
Align _get_list with the validation contract by accepting int | float.
@timtreis timtreis merged commit 3d796b0 into main Jul 10, 2026
4 of 8 checks passed
@timtreis timtreis deleted the fix/scalebar-accepts-int branch July 10, 2026 15:36
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.

1 participant