Skip to content

Report a clean error for invalid numeric values in snap, squiggles, l… - #870

Merged
abey79 merged 2 commits into
abey79:masterfrom
Miabeyefendi:fix-invalid-numeric-values
Oct 6, 2026
Merged

abey79 merged 2 commits into
abey79:masterfrom
Miabeyefendi:fix-invalid-numeric-values

Conversation

@Miabeyefendi

Copy link
Copy Markdown
Contributor

Description

snap 0, squiggles -p 0 (or -q 0), linesimplify -t -1 and random -n -1 crashed with a Python traceback (ZeroDivisionError / ValueError). They now fail with a regular usage error, e.g. Error: Invalid value: pitch must be greater than zero.

Checklist

  • feature/fix implemented
  • code formatting ok (ruff)
  • tests added/updated and pytest succeeds for the new tests
  • documentation added/updated
    • CHANGELOG.md updated

…inesimplify and random

These commands crashed with a traceback on zero pitch, zero period/quantization, negative tolerance or negative count. They now raise a regular usage error.
Comment thread CHANGELOG.md Outdated
@abey79
abey79 merged commit 795d2e9 into abey79:master Oct 6, 2026
10 checks passed
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