Skip to content

[fix] validate ties and direction rounding options - #122

Open
nikosavola wants to merge 1 commit into
Mc-Zen:mainfrom
nikosavola:nikosavola/push-zosotulrnnqk
Open

nikosavola wants to merge 1 commit into
Mc-Zen:mainfrom
nikosavola:nikosavola/push-zosotulrnnqk

Conversation

@nikosavola

Copy link
Copy Markdown
  • typo'd ties or direction values now raise a clear error on both the plain-number and the uncertainty path, instead of silently falling back to a default rounding behavior
  • adds a round-option-errors test

- typo'd ties or direction values now raise a clear error on both the plain-number and the
  uncertainty path, instead of silently falling back to a default rounding behavior
- adds a round-option-errors test
@Mc-Zen

Mc-Zen commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Actually, many invalid input types and values to num/quan are not checked internally. I am waiting for a built-in type checking to make this more rigorous. Doing this manually could lead to some performance overhead, although it is probably not significant.

For tiles, however, I see the value of adding a check already now. But note that the test is not passing and also the error messages mention option names round-ties and round-direction which do not reflect the current API names (being just ties and direction).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants