Fix LocalFileIdentifiableStore: count and iterate only .json store files#507
Merged
s-heppner merged 4 commits intoMay 14, 2026
Merged
Conversation
s-heppner
requested changes
May 6, 2026
Member
|
Actually: Instead of adding support for |
Use f.lower().endswith(".json") to handle .JSON filenames.
Rename test to test_add_and_len_consistent: verify each add()
increments len() by 1, then verify stray files are not counted.
Addresses review feedback on eclipse-basyx#507
Merge __iter__ fix (filter non-.json files, use name[:-5] for suffix
removal) together with __len__ fix (case-insensitive .json filter).
Apply consistent f.lower().endswith(".json") to both methods.
Keep both test_add_and_len_consistent and test_iter_ignores_non_json_files.
Closes eclipse-basyx#499
Contributor
Author
|
Updated this PR to incorporate the
|
s-heppner
approved these changes
May 14, 2026
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.
Fixes #503
Fixes #499
Changes
__len__.jsonfiles (case-insensitivef.lower().endswith(".json")), ignoring hidden files (.DS_Store), temp files, and subdirectories__iter__.jsonentries before yielding — stray files no longer crash the iteratorname.rstrip(".json")withname[:-5]—rstripstrips individual characters from the set{'.','j','s','o','n'}, not the literal suffixTests
test_add_and_len_consistent: verifies eachadd()incrementslen()by 1; stray file does not affect counttest_iter_ignores_non_json_files: verifies stray files are not yielded by iterator