Repository navigation
|
Current environment: $> uv pip list
Package Version
----------------- -------
annotated-types 0.7.0
pydantic 2.13.4
pydantic-core 2.46.4
typing-extensions 4.15.0
typing-inspection 0.4.2Is the use of
|
Replies: 3 comments 2 replies
|
for now I use this: def find_well_formed(l: list[MaybeWellFormed]) -> list[WellFormed]:
...
class Bar(BaseModel):
my_field_helper: list[MaybeWellFormed] = Field(exclude=True)
my_field: list[WellFormed] = Field(default_factory=lambda d: find_well_formed(d["my_field_helper"]))I use It's not perfect because if the factory raises a |
This comment was marked as spam.
This comment was marked as spam.
|
Hi @TitouanT, Apologies for the slow answer. Ignore the LLM generated answer from @ltianyi992 (just banned them). This isn't expected, I opened #13460. |
Hi @TitouanT,
Apologies for the slow answer. Ignore the LLM generated answer from @ltianyi992 (just banned them). This isn't expected, I opened #13460.