-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Test failure in 23.5.8 #7944
Comments
if you manually changed |
There is another failure after that:
Changing it to |
Incorrectly-generated type annotation diff --git a/src/idl_gen_python.cpp b/src/idl_gen_python.cpp
index 1b11bbe2..72b54604 100644
--- a/src/idl_gen_python.cpp
+++ b/src/idl_gen_python.cpp
@@ -773,8 +773,14 @@ class PythonGenerator : public BaseGenerator {
if (!parser_.opts.one_file && !parser_.opts.python_no_type_prefix_suffix) {
// Generate method without struct name.
- code += "def Add" + field_method + "(builder: flatbuffers.Builder, " + field_var + ": " + field_ty + "):\n";
+ code += "def Add" + field_method;
+ if (parser_.opts.python_typing) {
+ code += "(builder: flatbuffers.Builder, " + field_var + ": " + field_ty;
+ } else {
+ code += "(builder, " + field_var;
+ }
+ code += "):\n";
code +=
Indent + namer_.Type(struct_def) + "Add" + field_method;
code += "(builder, ";
code += field_var; There are more test errors, though:
|
flatbuffers/.github/workflows/build.yml Line 463 in 3e6cd51
This line should be |
Thanks, PR are welcomed |
Thanks, but a PR may not be meaningful unless changes are properly tested. By the way, those |
I meant a PR with the fixes and the CI updated to catch them. |
Thanks! Is there a timeline for a release including relevant fixes? |
Hi, was this ever fixed? I seem to be running into the same issue with flatc version 23.5.9. Changing "Any" to "any" manually fixes it, but obviously I'd have to do that every time I generate the code. |
* Don't generate types unless --python-typing specified Fixes google#7944 * Fix incorrect import statements Fixes google#7951 * Fix $PYTHONPATH in PythonTest.sh Regressed from google#7529 * PythonTest: fail if something goes wrong GitHub Actions runs `bash PythonTest.sh`, and thus failures were not visible. * Build flatc for Python tests * Regenerate codes --------- Co-authored-by: Derek Bailey <derekbailey@google.com>
* Don't generate types unless --python-typing specified Fixes google#7944 * Fix incorrect import statements Fixes google#7951 * Fix $PYTHONPATH in PythonTest.sh Regressed from google#7529 * PythonTest: fail if something goes wrong GitHub Actions runs `bash PythonTest.sh`, and thus failures were not visible. * Build flatc for Python tests * Regenerate codes --------- Co-authored-by: Derek Bailey <derekbailey@google.com>
With Python 3.11.3:
The text was updated successfully, but these errors were encountered: