Skip to content

Fix LocalFileIdentifiableStore.__iter__: filter non-.json files and use removesuffix#508

Open
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
rwth-iat:fix/b6-local-file-iter
Open

Fix LocalFileIdentifiableStore.__iter__: filter non-.json files and use removesuffix#508
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
rwth-iat:fix/b6-local-file-iter

Conversation

@zrgt
Copy link
Copy Markdown
Contributor

@zrgt zrgt commented May 5, 2026

Fixes #499

Changes

  • Add .endswith(".json") guard — stray files (.DS_Store, temp files, subdirectories) no longer crash the iterator
  • Replace name.rstrip(".json") with name.removesuffix(".json")rstrip strips individual characters from the set {'.','j','s','o','n'}, not the literal suffix
  • Add test_iter_ignores_non_json_files unit test

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