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
The first case for optional is definitely a bug and PR is in
Second case is a little trickier. For a workaround in the meantime setting never = {} should work and would be the behaviour. Right now polyfactory doesn't support nested recursive models other than in trivial cases where there is an obvious out e.g. choosing None in the case of the sometimes in the example.
Description
Encountering some strange errors with self-referencing models.
In the first case, there seems to be a 50/50 chance for the
pytest
to work:In the second case, the
pytest
seems to never work:Release Version
2.16.2
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: