We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.transmute()
Translation between higher-order objects isn't behaving properly when signatures don't exactly align.
Additionally, calling .transmute() on data with unknown fields fails, but should succeed.
import typic from typing import Optional @typic.klass class Source: test: Optional[str] = typic.field(init=False) field_to_ignore: str = "Ignore me" def __post_init__(self): self.test = "Something" @typic.klass class Dest: test: Optional[str] = None Dest.transmute(Source()) # => throws "Source is missing fields: ('test',)" Dest.transmute(Source().primitive()) # => throws "TypeError: __init__() got an unexpected keyword argument 'field_to_ignore'"
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
Translation between higher-order objects isn't behaving properly when signatures don't exactly align.
Additionally, calling
.transmute()
on data with unknown fields fails, but should succeed.What I Did
The text was updated successfully, but these errors were encountered: