mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 23:17:27 +00:00
Enable --gen-onefile in Python (#6953)
* Enable --gen-onefile in Python Made it possible to generate all python code in one file. Modified py_test.py so that it can switch between the multi-file code and the one-file code. Updated PythonTest.sh and py_test.py so that the multi-file code and the one-file code can be tested based on the same test code. * Sync with google/flatbuffers * Add --gen-onefile to generate_code.py
This commit is contained in:
@@ -8,7 +8,6 @@ class Any(object):
|
||||
TestSimpleTableWithEnum = 2
|
||||
MyGame_Example2_Monster = 3
|
||||
|
||||
|
||||
def AnyCreator(unionType, table):
|
||||
from flatbuffers.table import Table
|
||||
if not isinstance(table, Table):
|
||||
|
||||
@@ -8,7 +8,6 @@ class AnyAmbiguousAliases(object):
|
||||
M2 = 2
|
||||
M3 = 3
|
||||
|
||||
|
||||
def AnyAmbiguousAliasesCreator(unionType, table):
|
||||
from flatbuffers.table import Table
|
||||
if not isinstance(table, Table):
|
||||
|
||||
@@ -8,7 +8,6 @@ class AnyUniqueAliases(object):
|
||||
TS = 2
|
||||
M2 = 3
|
||||
|
||||
|
||||
def AnyUniqueAliasesCreator(unionType, table):
|
||||
from flatbuffers.table import Table
|
||||
if not isinstance(table, Table):
|
||||
|
||||
@@ -10,4 +10,3 @@ class Color(object):
|
||||
Green = 2
|
||||
# \brief color Blue (1u << 3)
|
||||
Blue = 8
|
||||
|
||||
|
||||
@@ -7,4 +7,3 @@ class Race(object):
|
||||
Human = 0
|
||||
Dwarf = 1
|
||||
Elf = 2
|
||||
|
||||
|
||||
@@ -6,4 +6,3 @@ class TestEnum(object):
|
||||
A = 0
|
||||
B = 1
|
||||
C = 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user