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
Widen term field type for mypy compatibility without pydantic plugin
Without the pydantic mypy plugin, mypy generates __init__ signatures
from field declarations rather than from explicit __init__ overrides.
This caused EqualTo(term="col", value=42) to produce:
error: Argument "term" has incompatible type "str"; expected "UnboundTerm"
Fix: widen field type from UnboundTerm to str | UnboundTerm with a
BeforeValidator that coerces str to Reference (matching the existing
_to_unbound_term helper). The validator ensures the stored value is
always UnboundTerm at runtime.
Closes#3101
0 commit comments