Repository navigation
fix: support HDF5Data instances in detect_flickering - #81
Merged
paulmueller merged 1 commit intoNov 23, 2026
Merged
paulmueller merged 1 commit into
paulmueller merged 1 commit into
Conversation
The docstring allowed `HDF5Data` instances, but slicing them failed with a `TypeError`. The "image" feature of the instance is used now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulmueller
approved these changes
Nov 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
==========================================
+ Coverage 88.14% 88.19% +0.04%
==========================================
Files 63 63
Lines 4522 4524 +2
==========================================
+ Hits 3986 3990 +4
+ Misses 536 534 -2 ☔ View full report in Codecov by Harness. 🚀 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 docstring of
detect_flickeringallows anHDF5Datainstance asimage_data, but the function sliced the instance itself (image_data[:max_frames]). That fails inHDF5Data.__getitem__:This has been the case since the function was introduced (0.25.0).
Fix
For an
HDF5Datainstance,image_data.imageis used. The docstring now says that the "image" feature is used.Tests
test_detect_flicker_hdf5data_instancenow also passes theHDF5Datainstance itself. It fails on main and passes here.tests/test_read_detect_flicker.pyandtests/test_read_cache.pypass.🤖 Generated with Claude Code