zmievsa / pydantic-duality

Automatically and lazily generate three versions of your pydantic models: one with Extra.forbid, one with Extra.ignore, and one with all fields optional
https://ovsyanka83.github.io/pydantic-duality/
MIT License
32 stars 1 forks source link

Fix infinite recursion case from dstack #23

Closed zmievsa closed 1 month ago

zmievsa commented 1 month ago

Sadly, I have no idea why this fixes their issue but it makes no difference in terms of duality's logic so might as well include it :)

Somehow with their combination of actions an issubclass(str, BaseModel) actually calls DualBaseModel.__subclasshook__

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (a32ddc0) to head (96958aa). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #23 +/- ## =========================================== + Coverage 98.90% 100.00% +1.09% =========================================== Files 5 1 -4 Lines 458 130 -328 Branches 35 20 -15 =========================================== - Hits 453 130 -323 + Misses 5 0 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.