Closed guacs closed 5 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
50.0% Coverage on New Code
0.0% Duplication on New Code
Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/509
Description
When importing
PyObject
frompydantic
, if it's v2 then a warning is raised due to it being deprecated in favor ofImportString
. The expectedImportError
doesn't occur until after the import ofPyObject
takes place hence any user that's using pydantic v2 would see the warning. This ensures thatPyObject
is imported last so that the warning is not raised.