You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments