fix(records): reject two lower or two upper bounds in TimeRange - #2752
Draft
andersfylling wants to merge 2 commits into
Draft
fix(records): reject two lower or two upper bounds in TimeRange#2752andersfylling wants to merge 2 commits into
andersfylling wants to merge 2 commits into
Conversation
The API rejects a range with both gte and gt (or both lte and lt), and the docstring says so, but the constructor builds it anyway and the request only fails server-side. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The constructor now raises ValueError for gte+gt and for lte+lt, which the docstring already documented as invalid. The fake resource generator fills every field, so it gets a special case, the same way DataPointSubscriptionWrite has one for its mutually exclusive arguments. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2752 +/- ##
==========================================
+ Coverage 93.77% 93.83% +0.05%
==========================================
Files 509 509
Lines 52252 52269 +17
==========================================
+ Hits 48999 49045 +46
+ Misses 3253 3224 -29
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API rejects a range carrying both
gteandgt(or bothlteandlt), and theTimeRangedocstring already says so, but the constructor builds it anyway and the request only fails server-side:Now a ValueError at construction, where the mistake is.
The fake resource generator behind the generic round-trip tests fills every field, so it gets a special case — the same way
DataPointSubscriptionWritealready has one for its mutually exclusive arguments. That change ships here, otherwisetest_base.pybreaks the moment this merges.First commit is the failing tests, second is the fix.
🤖 Generated with Claude Code