fix: return empty list instead of empty dict in load_training_data#971
Merged
regulartim merged 1 commit intointelowlproject:developfrom Mar 5, 2026
Conversation
Signed-off-by: Sanchit2662 <sanchit2662@gmail.com>
Contributor
Author
|
@regulartim , sorry again for the earlier mess-up! I've opened this fresh PR with the correct target branch this time. Would really appreciate a review when you get the chance 🙏 |
cclts
pushed a commit
to cclts/GreedyBear
that referenced
this pull request
Mar 11, 2026
…loses intelowlproject#965 (intelowlproject#971) Signed-off-by: Sanchit2662 <sanchit2662@gmail.com>
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.
Description
I noticed that load_training_data() in scoring_jobs.py returns {} (empty dict) when loading fails, but the function signature says it returns list[dict] and the happy path returns a list from json.load(). The docstring also said "empty dict". I changed the fallback to return [] and updated the docstring to say "empty list" so everything is consistent with the declared return type.
closes #965
Type of change
Checklist
Formalities
<feature name>. Closes #999develop.develop.Docs and tests
Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.