Noticed problematic code generation #1246
Unanswered
FlyingPufferFish
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I'm new to
openapi-python-client
. I recently generated the ConfigCat Public Management API viauvx openapi-python-client generate
using this json file provided by ConfigCat.The Problem
Looking through the generated code, found some issues like the python snippet below from file
update_setting_value_v2.py
:body
is a union of two exact same typesif isinstance(body, list["JsonPatchOperation"])
isn't correct python (see relevant PEP here), it should be something likeif isinstance(body, list) and all(isinstance(item, JsonPatchOperation) for item in body)
What might be causing this? Any pointers would be greatly appreciated, thank you 🙏
Extra Info
uv
version: 0.4.6The section in ConfigCat json linked above that's relevant to the code snippet
Beta Was this translation helpful? Give feedback.
All reactions