Can you take a look at the last two commits? If you OK think, they are OK. Merge them…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
Can you take a look at the last two commits? If you OK think, they are OK. Merge them into one commit, and rewrite the commit message. Update any tests if needed.
Assistant
I've examined the two commits. Both modify
_literal_schemainsrc/pydantic2linkml/gen_linkml.py:d5701caadds handling for single-type literals (all str or all int) so the LinkML usesequals_string/equals_numberwith conciserange, usingany_ofonly for multiple literalsda3ff03refactors to remove the str/int branching duplication usingsetattr/dict unpacking
They are logically one unit of work. However, they left
test_literal_schemafailing — theLiteral["hello"]parametrize case still assertsrange == "Any". Tests need updating, and new cases should be added for the new code paths.Let me write the plan.
Assistant
Now let me update the test. I'll rewrite the parametrize with richer expected state.
Assistant
All 7 cases pass. Now let me run the full test file, ruff, and type check in parallel.
Assistant
Type errors are all pre-existing (none at lines I touched). Per project convention, I'll ignore pre-existing errors. Now squashing the two commits.
Assistant
Same 27 pre-existing type errors — unchanged. All checks pass. Now squashing the two commits.
Assistant
Squashed into one commit
1aee308on top of01576b8. All checks pass:- pytest (full
test_gen_linkml.py): 3492 passed, 14 xfailed - ruff check: All checks passed
- ruff format --check: 14 files already formatted
- mypy: 27 errors (all pre-existing, unchanged)
The new commit combines the feature and refactor with an updated message, and includes the test changes covering the new single-type code paths (single str, single int, multiple str, multiple int), mixed-type, and unsupported cases.
- pytest (full