mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 20:15:34 +00:00
[Python] Avoid double flatbuffers include in pyi files (#8626)
This commit is contained in:
@@ -587,6 +587,7 @@ class PythonStubGenerator {
|
||||
std::map<std::string, std::set<std::string>> names_by_module;
|
||||
for (const Import &import : imports.imports) {
|
||||
if (import.IsLocal()) continue; // skip all local imports
|
||||
if (import.module == "flatbuffers" && import.name == "") continue; // skip double include hardcoded flatbuffers
|
||||
if (import.name == "") {
|
||||
modules.insert(import.module);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user