Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect construction of LabwareOffsetVectors.
The old code was type-unsafe (`cast()`) but we got away with it because both types had compatible fields. Earlier commits in this PR tried to fix that by using `model_validate()` instead of `cast()`. But `model_validate()` can't directly convert one Pydantic model into another like that, so it raised a runtime error. That wasn't caught by the type checker because `model_validate()` is, sensibly, typed to allow any untrusted input. This converts between the two types verbosely and type-safely, by spelling out each field.
- Loading branch information