Skip to content

0.156.2: format_duration reads a non-string step_name as absent, words a whole count exactly - #69

Merged
tmoosting merged 2 commits into
mainfrom
calendar-duration-faults
Nov 27, 2026
Merged

tmoosting merged 2 commits into
mainfrom
calendar-duration-faults

Conversation

@tmoosting

Copy link
Copy Markdown
Member

Two faults in calendar.format_duration: a step_name that is not a string raised TypeError (the calendar profile reads an optional key of the wrong kind as absent, so it now falls back to the grain), and a whole count was rounded through n * 100, which is not exact past 2^53 / 100 (9007199254740990 steps were worded as 9007199254740989 days). Tests for both in tests/test_calendar.py; the npm SDK moves the same way.

Both measured red on 0.156.1 before the change.

🤖 Generated with Claude Code

tmoosting and others added 2 commits November 27, 2026 07:38
…words a whole count exactly

A step_name of the wrong kind raised TypeError; the calendar profile reads an optional key of
the wrong kind as absent, so the duration is worded in the grain. A whole count was rounded
through n * 100, which is not exact past 2^53 / 100: 9007199254740990 steps came back as
9007199254740989 days. The npm SDK's formatDuration moves the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lumns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit 8b699e1 into main Nov 27, 2026
11 checks passed

This branch was previously deployed

1 inactive deployment
pypi — 8b699e16 Deployed Nov 27, 2026 by tmoosting via publish #250
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.

1 participant