A pydantic BaseModel field with the type list[int] | None
will produce [[123]]
Fix incoming
from pydantic import BaseModel
from polyfactory.factories.pydantic_factory import ModelFactory
class Model(BaseModel):
optional_list: list[int] | None
list(ModelFactory._get_or_create_factory(Model).coverage())
Run the above
2.15
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too