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
{{ message }}
Repository navigation
Generation results in F821 Undefined name types error #1274
Describe the bug
Ruff check of generated code is failing
Generating a client from an openapi.json file results in
Error(s) encountered while generating, client was not created
ruff failed
infinity_embedding_inference_server_client/models/embedding_object.py:34:58: F821 Undefined name `types`
Found 188 errors (187 fixed, 1 remaining).
Error(s) encountered while generating, client was not created
ruff failed
infinity_embedding_inference_server_client/models/embedding_object.py:34:58: F821 Undefined name `types`
Found 188 errors (187 fixed, 1 remaining).
Error with ruff ruff-0.12.0
Error(s) encountered while generating, client was not created
ruff failed
infinity_embedding_inference_server_client/models/embedding_object.py:34:58: F821 Undefined name `types`
|
33 | def to_dict(self) -> dict[str, Any]:
34 | embedding: Union[list[float], list[list[float]], types.FileTypes]
| ^^^^^ F821
35 | if isinstance(self.embedding, list):
36 | embedding = self.embedding
|
Found 280 errors (279 fixed, 1 remaining).
I don't think the document is accurate, because sending raw binary data within JSON isn't possible. So it might be that the document should have format: "byte" instead (base64-encoded)?
But it's in a union, so maybe the API just only actually returns the integer arrays and not the binary data. Either way, the import error should be fixed with #1278
Activity
types#1277 as a duplicate of this issuefix: Import error for `types.FileType` (#1274)
dbanty commentedon Jul 3, 2025
I don't think the document is accurate, because sending raw binary data within JSON isn't possible. So it might be that the document should have
format: "byte"instead (base64-encoded)?But it's in a union, so maybe the API just only actually returns the integer arrays and not the binary data. Either way, the import error should be fixed with #1278
Release 0.25.2 (#1279)
fix: Import error for `types.FileType` (openapi-generators#1274) (ope…