From d01f20f2fbccad872ed35d4ee24a18e6586c6b7c Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Sun, 21 Dec 2025 14:18:05 -0500 Subject: [PATCH] Fix python generation with nested flatbuffers (#8854) * implement fix from issue * implement actual fix --- src/idl_gen_python.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/idl_gen_python.cpp b/src/idl_gen_python.cpp index d325fee5b..15b381196 100644 --- a/src/idl_gen_python.cpp +++ b/src/idl_gen_python.cpp @@ -1201,12 +1201,15 @@ class PythonGenerator : public BaseGenerator { return; } // There is no nested flatbuffer. - const std::string unqualified_name = nested->constant; + std::string unqualified_name = nested->constant; std::string qualified_name = NestedFlatbufferType(unqualified_name); if (qualified_name.empty()) { qualified_name = nested->constant; } + // name may be partially qualified -- need to get the true unqualified name + unqualified_name = namer_.Denamespace(qualified_name); + const ImportMapEntry import_entry = {qualified_name, unqualified_name}; auto& code = *code_ptr;