-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQ][python-nextgen] make float parsing more lenient #14499
Comments
Fyi if you are open to using the
|
@spacether thanks. We have many projects based on clients generated by the python-prior generator. The python-nextgen sources look more compatible than the current |
It seems legitimate to parse Note: generated code works fine for me if I post-process it like this: find models -iname '*.py' -type f -print0 | xargs -0 sed -r -i 's/: StrictFloat/: float/g'
find models -iname '*.py' -type f -print0 | xargs -0 sed -r -i 's/: Optional\[StrictFloat\]/: Optional[float]/g' |
I've filed #14618 to add an option to make float's strict type configurable. |
Tested successfully on 3746a20. |
If a response json field is an int (
1
), although the target field type is float (1.0
) , the response parsing fails with an error likeDescribe the solution you'd like
Can the parsing be more lenient? Former python generators parsed this more leniently.
Describe alternatives you've considered
None
Additional context
I'm trying to use the latest python client code generator. Btw, great job on the source compatibility 👍 .
The text was updated successfully, but these errors were encountered: