summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChih-Hsuan Yen <1937689+yan12125@users.noreply.github.com>2023-05-18 04:10:51 +0800
committerGitHub <noreply@github.com>2023-05-17 13:10:51 -0700
commita352bdbc34130aea537040cd2bfe9eb73d63c74b (patch)
tree4b67fb83af3870872a8fa90590e54256fd6bc696 /tests
parentcb14043f820271287ec0a487467612c1932c80f9 (diff)
downloadflatbuffers-a352bdbc34130aea537040cd2bfe9eb73d63c74b.tar.gz
flatbuffers-a352bdbc34130aea537040cd2bfe9eb73d63c74b.tar.bz2
flatbuffers-a352bdbc34130aea537040cd2bfe9eb73d63c74b.zip
Fix python tests (#7960)
* Don't generate types unless --python-typing specified Fixes https://github.com/google/flatbuffers/issues/7944 * Fix incorrect import statements Fixes https://github.com/google/flatbuffers/issues/7951 * Fix $PYTHONPATH in PythonTest.sh Regressed from https://github.com/google/flatbuffers/pull/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>
Diffstat (limited to 'tests')
-rw-r--r--tests/MyGame/Example/ArrayStruct.py2
-rw-r--r--tests/MyGame/Example/ArrayTable.py2
-rw-r--r--tests/MyGame/Example/Monster.py150
-rw-r--r--tests/MyGame/Example/NestedUnion/Vec3.py2
-rw-r--r--tests/MyGame/Example/Referrable.py2
-rw-r--r--tests/MyGame/Example/Stat.py6
-rw-r--r--tests/MyGame/Example/TestSimpleTableWithEnum.py2
-rw-r--r--tests/MyGame/Example/TypeAliases.py24
-rwxr-xr-xtests/PythonTest.sh6
-rw-r--r--tests/monster_test_generated.py4
-rw-r--r--tests/optional_scalars/ScalarStuff.py72
11 files changed, 137 insertions, 135 deletions
diff --git a/tests/MyGame/Example/ArrayStruct.py b/tests/MyGame/Example/ArrayStruct.py
index be85ec89..a839c09f 100644
--- a/tests/MyGame/Example/ArrayStruct.py
+++ b/tests/MyGame/Example/ArrayStruct.py
@@ -5,7 +5,7 @@
import flatbuffers
from flatbuffers.compat import import_numpy
from typing import Any
-from .MyGame.Example.NestedStruct import NestedStruct
+from MyGame.Example.NestedStruct import NestedStruct
np = import_numpy()
class ArrayStruct(object):
diff --git a/tests/MyGame/Example/ArrayTable.py b/tests/MyGame/Example/ArrayTable.py
index 90fbb4a4..7d314dfd 100644
--- a/tests/MyGame/Example/ArrayTable.py
+++ b/tests/MyGame/Example/ArrayTable.py
@@ -5,7 +5,7 @@
import flatbuffers
from flatbuffers.compat import import_numpy
from typing import Any
-from .MyGame.Example.ArrayStruct import ArrayStruct
+from MyGame.Example.ArrayStruct import ArrayStruct
from typing import Optional
np = import_numpy()
diff --git a/tests/MyGame/Example/Monster.py b/tests/MyGame/Example/Monster.py
index f216f84f..1503011f 100644
--- a/tests/MyGame/Example/Monster.py
+++ b/tests/MyGame/Example/Monster.py
@@ -34,7 +34,7 @@ class Monster(object):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
x = o + self._tab.Pos
- from .MyGame.Example.Vec3 import Vec3
+ from MyGame.Example.Vec3 import Vec3
obj = Vec3()
obj.Init(self._tab.Bytes, x)
return obj
@@ -118,7 +118,7 @@ class Monster(object):
if o != 0:
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
- from .MyGame.Example.Test import Test
+ from MyGame.Example.Test import Test
obj = Test()
obj.Init(self._tab.Bytes, x)
return obj
@@ -165,7 +165,7 @@ class Monster(object):
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
x = self._tab.Indirect(x)
- from .MyGame.Example.Monster import Monster
+ from MyGame.Example.Monster import Monster
obj = Monster()
obj.Init(self._tab.Bytes, x)
return obj
@@ -188,7 +188,7 @@ class Monster(object):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
- from .MyGame.Example.Monster import Monster
+ from MyGame.Example.Monster import Monster
obj = Monster()
obj.Init(self._tab.Bytes, x)
return obj
@@ -213,7 +213,7 @@ class Monster(object):
def TestnestedflatbufferNestedRoot(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
if o != 0:
- from .MyGame.Example.Monster import Monster
+ from MyGame.Example.Monster import Monster
return Monster.GetRootAs(self._tab.Bytes, self._tab.Vector(o))
return 0
@@ -234,7 +234,7 @@ class Monster(object):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
- from .MyGame.Example.Stat import Stat
+ from MyGame.Example.Stat import Stat
obj = Stat()
obj.Init(self._tab.Bytes, x)
return obj
@@ -377,7 +377,7 @@ class Monster(object):
if o != 0:
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 8
- from .MyGame.Example.Ability import Ability
+ from MyGame.Example.Ability import Ability
obj = Ability()
obj.Init(self._tab.Bytes, x)
return obj
@@ -428,7 +428,7 @@ class Monster(object):
if o != 0:
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
- from .MyGame.Example.Test import Test
+ from MyGame.Example.Test import Test
obj = Test()
obj.Init(self._tab.Bytes, x)
return obj
@@ -505,7 +505,7 @@ class Monster(object):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(72))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
- from .MyGame.InParentNamespace import InParentNamespace
+ from MyGame.InParentNamespace import InParentNamespace
obj = InParentNamespace()
obj.Init(self._tab.Bytes, x)
return obj
@@ -518,7 +518,7 @@ class Monster(object):
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
x = self._tab.Indirect(x)
- from .MyGame.Example.Referrable import Referrable
+ from MyGame.Example.Referrable import Referrable
obj = Referrable()
obj.Init(self._tab.Bytes, x)
return obj
@@ -577,7 +577,7 @@ class Monster(object):
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
x = self._tab.Indirect(x)
- from .MyGame.Example.Referrable import Referrable
+ from MyGame.Example.Referrable import Referrable
obj = Referrable()
obj.Init(self._tab.Bytes, x)
return obj
@@ -750,7 +750,7 @@ class Monster(object):
def TestrequirednestedflatbufferNestedRoot(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(102))
if o != 0:
- from .MyGame.Example.Monster import Monster
+ from MyGame.Example.Monster import Monster
return Monster.GetRootAs(self._tab.Bytes, self._tab.Vector(o))
return 0
@@ -773,7 +773,7 @@ class Monster(object):
x = self._tab.Vector(o)
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
x = self._tab.Indirect(x)
- from .MyGame.Example.Stat import Stat
+ from MyGame.Example.Stat import Stat
obj = Stat()
obj.Init(self._tab.Bytes, x)
return obj
@@ -796,7 +796,7 @@ class Monster(object):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(106))
if o != 0:
x = o + self._tab.Pos
- from .MyGame.Example.Test import Test
+ from MyGame.Example.Test import Test
obj = Test()
obj.Init(self._tab.Bytes, x)
return obj
@@ -881,31 +881,31 @@ def Start(builder):
def MonsterAddPos(builder, pos):
builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0)
-def AddPos(builder: flatbuffers.Builder, pos: Any):
+def AddPos(builder, pos):
MonsterAddPos(builder, pos)
def MonsterAddMana(builder, mana):
builder.PrependInt16Slot(1, mana, 150)
-def AddMana(builder: flatbuffers.Builder, mana: int):
+def AddMana(builder, mana):
MonsterAddMana(builder, mana)
def MonsterAddHp(builder, hp):
builder.PrependInt16Slot(2, hp, 100)
-def AddHp(builder: flatbuffers.Builder, hp: int):
+def AddHp(builder, hp):
MonsterAddHp(builder, hp)
def MonsterAddName(builder, name):
builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
-def AddName(builder: flatbuffers.Builder, name: int):
+def AddName(builder, name):
MonsterAddName(builder, name)
def MonsterAddInventory(builder, inventory):
builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(inventory), 0)
-def AddInventory(builder: flatbuffers.Builder, inventory: int):
+def AddInventory(builder, inventory):
MonsterAddInventory(builder, inventory)
def MonsterStartInventoryVector(builder, numElems):
@@ -917,25 +917,25 @@ def StartInventoryVector(builder, numElems: int) -> int:
def MonsterAddColor(builder, color):
builder.PrependUint8Slot(6, color, 8)
-def AddColor(builder: flatbuffers.Builder, color: int):
+def AddColor(builder, color):
MonsterAddColor(builder, color)
def MonsterAddTestType(builder, testType):
builder.PrependUint8Slot(7, testType, 0)
-def AddTestType(builder: flatbuffers.Builder, testType: int):
+def AddTestType(builder, testType):
MonsterAddTestType(builder, testType)
def MonsterAddTest(builder, test):
builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(test), 0)
-def AddTest(builder: flatbuffers.Builder, test: int):
+def AddTest(builder, test):
MonsterAddTest(builder, test)
def MonsterAddTest4(builder, test4):
builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(test4), 0)
-def AddTest4(builder: flatbuffers.Builder, test4: int):
+def AddTest4(builder, test4):
MonsterAddTest4(builder, test4)
def MonsterStartTest4Vector(builder, numElems):
@@ -947,7 +947,7 @@ def StartTest4Vector(builder, numElems: int) -> int:
def MonsterAddTestarrayofstring(builder, testarrayofstring):
builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring), 0)
-def AddTestarrayofstring(builder: flatbuffers.Builder, testarrayofstring: int):
+def AddTestarrayofstring(builder, testarrayofstring):
MonsterAddTestarrayofstring(builder, testarrayofstring)
def MonsterStartTestarrayofstringVector(builder, numElems):
@@ -959,7 +959,7 @@ def StartTestarrayofstringVector(builder, numElems: int) -> int:
def MonsterAddTestarrayoftables(builder, testarrayoftables):
builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayoftables), 0)
-def AddTestarrayoftables(builder: flatbuffers.Builder, testarrayoftables: int):
+def AddTestarrayoftables(builder, testarrayoftables):
MonsterAddTestarrayoftables(builder, testarrayoftables)
def MonsterStartTestarrayoftablesVector(builder, numElems):
@@ -971,13 +971,13 @@ def StartTestarrayoftablesVector(builder, numElems: int) -> int:
def MonsterAddEnemy(builder, enemy):
builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(enemy), 0)
-def AddEnemy(builder: flatbuffers.Builder, enemy: int):
+def AddEnemy(builder, enemy):
MonsterAddEnemy(builder, enemy)
def MonsterAddTestnestedflatbuffer(builder, testnestedflatbuffer):
builder.PrependUOffsetTRelativeSlot(13, flatbuffers.number_types.UOffsetTFlags.py_type(testnestedflatbuffer), 0)
-def AddTestnestedflatbuffer(builder: flatbuffers.Builder, testnestedflatbuffer: int):
+def AddTestnestedflatbuffer(builder, testnestedflatbuffer):
MonsterAddTestnestedflatbuffer(builder, testnestedflatbuffer)
def MonsterStartTestnestedflatbufferVector(builder, numElems):
@@ -996,67 +996,67 @@ def MakeTestnestedflatbufferVectorFromBytes(builder, bytes):
def MonsterAddTestempty(builder, testempty):
builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(testempty), 0)
-def AddTestempty(builder: flatbuffers.Builder, testempty: int):
+def AddTestempty(builder, testempty):
MonsterAddTestempty(builder, testempty)
def MonsterAddTestbool(builder, testbool):
builder.PrependBoolSlot(15, testbool, 0)
-def AddTestbool(builder: flatbuffers.Builder, testbool: bool):
+def AddTestbool(builder, testbool):
MonsterAddTestbool(builder, testbool)
def MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1):
builder.PrependInt32Slot(16, testhashs32Fnv1, 0)
-def AddTesthashs32Fnv1(builder: flatbuffers.Builder, testhashs32Fnv1: int):
+def AddTesthashs32Fnv1(builder, testhashs32Fnv1):
MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1)
def MonsterAddTesthashu32Fnv1(builder, testhashu32Fnv1):
builder.PrependUint32Slot(17, testhashu32Fnv1, 0)
-def AddTesthashu32Fnv1(builder: flatbuffers.Builder, testhashu32Fnv1: int):
+def AddTesthashu32Fnv1(builder, testhashu32Fnv1):
MonsterAddTesthashu32Fnv1(builder, testhashu32Fnv1)
def MonsterAddTesthashs64Fnv1(builder, testhashs64Fnv1):
builder.PrependInt64Slot(18, testhashs64Fnv1, 0)
-def AddTesthashs64Fnv1(builder: flatbuffers.Builder, testhashs64Fnv1: int):
+def AddTesthashs64Fnv1(builder, testhashs64Fnv1):
MonsterAddTesthashs64Fnv1(builder, testhashs64Fnv1)
def MonsterAddTesthashu64Fnv1(builder, testhashu64Fnv1):
builder.PrependUint64Slot(19, testhashu64Fnv1, 0)
-def AddTesthashu64Fnv1(builder: flatbuffers.Builder, testhashu64Fnv1: int):
+def AddTesthashu64Fnv1(builder, testhashu64Fnv1):
MonsterAddTesthashu64Fnv1(builder, testhashu64Fnv1)
def MonsterAddTesthashs32Fnv1a(builder, testhashs32Fnv1a):
builder.PrependInt32Slot(20, testhashs32Fnv1a, 0)
-def AddTesthashs32Fnv1a(builder: flatbuffers.Builder, testhashs32Fnv1a: int):
+def AddTesthashs32Fnv1a(builder, testhashs32Fnv1a):
MonsterAddTesthashs32Fnv1a(builder, testhashs32Fnv1a)
def MonsterAddTesthashu32Fnv1a(builder, testhashu32Fnv1a):
builder.PrependUint32Slot(21, testhashu32Fnv1a, 0)
-def AddTesthashu32Fnv1a(builder: flatbuffers.Builder, testhashu32Fnv1a: int):
+def AddTesthashu32Fnv1a(builder, testhashu32Fnv1a):
MonsterAddTesthashu32Fnv1a(builder, testhashu32Fnv1a)
def MonsterAddTesthashs64Fnv1a(builder, testhashs64Fnv1a):
builder.PrependInt64Slot(22, testhashs64Fnv1a, 0)
-def AddTesthashs64Fnv1a(builder: flatbuffers.Builder, testhashs64Fnv1a: int):
+def AddTesthashs64Fnv1a(builder, testhashs64Fnv1a):
MonsterAddTesthashs64Fnv1a(builder, testhashs64Fnv1a)
def MonsterAddTesthashu64Fnv1a(builder, testhashu64Fnv1a):
builder.PrependUint64Slot(23, testhashu64Fnv1a, 0)
-def AddTesthashu64Fnv1a(builder: flatbuffers.Builder, testhashu64Fnv1a: int):
+def AddTesthashu64Fnv1a(builder, testhashu64Fnv1a):
MonsterAddTesthashu64Fnv1a(builder, testhashu64Fnv1a)
def MonsterAddTestarrayofbools(builder, testarrayofbools):
builder.PrependUOffsetTRelativeSlot(24, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofbools), 0)
-def AddTestarrayofbools(builder: flatbuffers.Builder, testarrayofbools: int):
+def AddTestarrayofbools(builder, testarrayofbools):
MonsterAddTestarrayofbools(builder, testarrayofbools)
def MonsterStartTestarrayofboolsVector(builder, numElems):
@@ -1068,25 +1068,25 @@ def StartTestarrayofboolsVector(builder, numElems: int) -> int:
def MonsterAddTestf(builder, testf):
builder.PrependFloat32Slot(25, testf, 3.14159)
-def AddTestf(builder: flatbuffers.Builder, testf: float):
+def AddTestf(builder, testf):
MonsterAddTestf(builder, testf)
def MonsterAddTestf2(builder, testf2):
builder.PrependFloat32Slot(26, testf2, 3.0)
-def AddTestf2(builder: flatbuffers.Builder, testf2: float):
+def AddTestf2(builder, testf2):
MonsterAddTestf2(builder, testf2)
def MonsterAddTestf3(builder, testf3):
builder.PrependFloat32Slot(27, testf3, 0.0)
-def AddTestf3(builder: flatbuffers.Builder, testf3: float):
+def AddTestf3(builder, testf3):
MonsterAddTestf3(builder, testf3)
def MonsterAddTestarrayofstring2(builder, testarrayofstring2):
builder.PrependUOffsetTRelativeSlot(28, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring2), 0)
-def AddTestarrayofstring2(builder: flatbuffers.Builder, testarrayofstring2: int):
+def AddTestarrayofstring2(builder, testarrayofstring2):
MonsterAddTestarrayofstring2(builder, testarrayofstring2)
def MonsterStartTestarrayofstring2Vector(builder, numElems):
@@ -1098,7 +1098,7 @@ def StartTestarrayofstring2Vector(builder, numElems: int) -> int:
def MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstruct):
builder.PrependUOffsetTRelativeSlot(29, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofsortedstruct), 0)
-def AddTestarrayofsortedstruct(builder: flatbuffers.Builder, testarrayofsortedstruct: int):
+def AddTestarrayofsortedstruct(builder, testarrayofsortedstruct):
MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstruct)
def MonsterStartTestarrayofsortedstructVector(builder, numElems):
@@ -1110,7 +1110,7 @@ def StartTestarrayofsortedstructVector(builder, numElems: int) -> int:
def MonsterAddFlex(builder, flex):
builder.PrependUOffsetTRelativeSlot(30, flatbuffers.number_types.UOffsetTFlags.py_type(flex), 0)
-def AddFlex(builder: flatbuffers.Builder, flex: int):
+def AddFlex(builder, flex):
MonsterAddFlex(builder, flex)
def MonsterStartFlexVector(builder, numElems):
@@ -1122,7 +1122,7 @@ def StartFlexVector(builder, numElems: int) -> int:
def MonsterAddTest5(builder, test5):
builder.PrependUOffsetTRelativeSlot(31, flatbuffers.number_types.UOffsetTFlags.py_type(test5), 0)
-def AddTest5(builder: flatbuffers.Builder, test5: int):
+def AddTest5(builder, test5):
MonsterAddTest5(builder, test5)
def MonsterStartTest5Vector(builder, numElems):
@@ -1134,7 +1134,7 @@ def StartTest5Vector(builder, numElems: int) -> int:
def MonsterAddVectorOfLongs(builder, vectorOfLongs):
builder.PrependUOffsetTRelativeSlot(32, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfLongs), 0)
-def AddVectorOfLongs(builder: flatbuffers.Builder, vectorOfLongs: int):
+def AddVectorOfLongs(builder, vectorOfLongs):
MonsterAddVectorOfLongs(builder, vectorOfLongs)
def MonsterStartVectorOfLongsVector(builder, numElems):
@@ -1146,7 +1146,7 @@ def StartVectorOfLongsVector(builder, numElems: int) -> int:
def MonsterAddVectorOfDoubles(builder, vectorOfDoubles):
builder.PrependUOffsetTRelativeSlot(33, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfDoubles), 0)
-def AddVectorOfDoubles(builder: flatbuffers.Builder, vectorOfDoubles: int):
+def AddVectorOfDoubles(builder, vectorOfDoubles):
MonsterAddVectorOfDoubles(builder, vectorOfDoubles)
def MonsterStartVectorOfDoublesVector(builder, numElems):
@@ -1158,13 +1158,13 @@ def StartVectorOfDoublesVector(builder, numElems: int) -> int:
def MonsterAddParentNamespaceTest(builder, parentNamespaceTest):
builder.PrependUOffsetTRelativeSlot(34, flatbuffers.number_types.UOffsetTFlags.py_type(parentNamespaceTest), 0)
-def AddParentNamespaceTest(builder: flatbuffers.Builder, parentNamespaceTest: int):
+def AddParentNamespaceTest(builder, parentNamespaceTest):
MonsterAddParentNamespaceTest(builder, parentNamespaceTest)
def MonsterAddVectorOfReferrables(builder, vectorOfReferrables):
builder.PrependUOffsetTRelativeSlot(35, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfReferrables), 0)
-def AddVectorOfReferrables(builder: flatbuffers.Builder, vectorOfReferrables: int):
+def AddVectorOfReferrables(builder, vectorOfReferrables):
MonsterAddVectorOfReferrables(builder, vectorOfReferrables)
def MonsterStartVectorOfReferrablesVector(builder, numElems):
@@ -1176,13 +1176,13 @@ def StartVectorOfReferrablesVector(builder, numElems: int) -> int:
def MonsterAddSingleWeakReference(builder, singleWeakReference):
builder.PrependUint64Slot(36, singleWeakReference, 0)
-def AddSingleWeakReference(builder: flatbuffers.Builder, singleWeakReference: int):
+def AddSingleWeakReference(builder, singleWeakReference):
MonsterAddSingleWeakReference(builder, singleWeakReference)
def MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferences):
builder.PrependUOffsetTRelativeSlot(37, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfWeakReferences), 0)
-def AddVectorOfWeakReferences(builder: flatbuffers.Builder, vectorOfWeakReferences: int):
+def AddVectorOfWeakReferences(builder, vectorOfWeakReferences):
MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferences)
def MonsterStartVectorOfWeakReferencesVector(builder, numElems):
@@ -1194,7 +1194,7 @@ def StartVectorOfWeakReferencesVector(builder, numElems: int) -> int:
def MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrables):
builder.PrependUOffsetTRelativeSlot(38, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfStrongReferrables), 0)
-def AddVectorOfStrongReferrables(builder: flatbuffers.Builder, vectorOfStrongReferrables: int):
+def AddVectorOfStrongReferrables(builder, vectorOfStrongReferrables):
MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrables)
def MonsterStartVectorOfStrongReferrablesVector(builder, numElems):
@@ -1206,13 +1206,13 @@ def StartVectorOfStrongReferrablesVector(builder, numElems: int) -> int:
def MonsterAddCoOwningReference(builder, coOwningReference):
builder.PrependUint64Slot(39, coOwningReference, 0)
-def AddCoOwningReference(builder: flatbuffers.Builder, coOwningReference: int):
+def AddCoOwningReference(builder, coOwningReference):
MonsterAddCoOwningReference(builder, coOwningReference)
def MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences):
builder.PrependUOffsetTRelativeSlot(40, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfCoOwningReferences), 0)
-def AddVectorOfCoOwningReferences(builder: flatbuffers.Builder, vectorOfCoOwningReferences: int):
+def AddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences):
MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences)
def MonsterStartVectorOfCoOwningReferencesVector(builder, numElems):
@@ -1224,13 +1224,13 @@ def StartVectorOfCoOwningReferencesVector(builder, numElems: int) -> int:
def MonsterAddNonOwningReference(builder, nonOwningReference):
builder.PrependUint64Slot(41, nonOwningReference, 0)
-def AddNonOwningReference(builder: flatbuffers.Builder, nonOwningReference: int):
+def AddNonOwningReference(builder, nonOwningReference):
MonsterAddNonOwningReference(builder, nonOwningReference)
def MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences):
builder.PrependUOffsetTRelativeSlot(42, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfNonOwningReferences), 0)
-def AddVectorOfNonOwningReferences(builder: flatbuffers.Builder, vectorOfNonOwningReferences: int):
+def AddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences):
MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences)
def MonsterStartVectorOfNonOwningReferencesVector(builder, numElems):
@@ -1242,31 +1242,31 @@ def StartVectorOfNonOwningReferencesVector(builder, numElems: int) -> int:
def MonsterAddAnyUniqueType(builder, anyUniqueType):
builder.PrependUint8Slot(43, anyUniqueType, 0)
-def AddAnyUniqueType(builder: flatbuffers.Builder, anyUniqueType: int):
+def AddAnyUniqueType(builder, anyUniqueType):
MonsterAddAnyUniqueType(builder, anyUniqueType)
def MonsterAddAnyUnique(builder, anyUnique):
builder.PrependUOffsetTRelativeSlot(44, flatbuffers.number_types.UOffsetTFlags.py_type(anyUnique), 0)
-def AddAnyUnique(builder: flatbuffers.Builder, anyUnique: int):
+def AddAnyUnique(builder, anyUnique):
MonsterAddAnyUnique(builder, anyUnique)
def MonsterAddAnyAmbiguousType(builder, anyAmbiguousType):
builder.PrependUint8Slot(45, anyAmbiguousType, 0)
-def AddAnyAmbiguousType(builder: flatbuffers.Builder, anyAmbiguousType: int):
+def AddAnyAmbiguousType(builder, anyAmbiguousType):
MonsterAddAnyAmbiguousType(builder, anyAmbiguousType)
def MonsterAddAnyAmbiguous(builder, anyAmbiguous):
builder.PrependUOffsetTRelativeSlot(46, flatbuffers.number_types.UOffsetTFlags.py_type(anyAmbiguous), 0)
-def AddAnyAmbiguous(builder: flatbuffers.Builder, anyAmbiguous: int):
+def AddAnyAmbiguous(builder, anyAmbiguous):
MonsterAddAnyAmbiguous(builder, anyAmbiguous)
def MonsterAddVectorOfEnums(builder, vectorOfEnums):
builder.PrependUOffsetTRelativeSlot(47, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfEnums), 0)
-def AddVectorOfEnums(builder: flatbuffers.Builder, vectorOfEnums: int):
+def AddVectorOfEnums(builder, vectorOfEnums):
MonsterAddVectorOfEnums(builder, vectorOfEnums)
def MonsterStartVectorOfEnumsVector(builder, numElems):
@@ -1278,13 +1278,13 @@ def StartVectorOfEnumsVector(builder, numElems: int) -> int:
def MonsterAddSignedEnum(builder, signedEnum):
builder.PrependInt8Slot(48, signedEnum, -1)
-def AddSignedEnum(builder: flatbuffers.Builder, signedEnum: int):
+def AddSignedEnum(builder, signedEnum):
MonsterAddSignedEnum(builder, signedEnum)
def MonsterAddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer):
builder.PrependUOffsetTRelativeSlot(49, flatbuffers.number_types.UOffsetTFlags.py_type(testrequirednestedflatbuffer), 0)
-def AddTestrequirednestedflatbuffer(builder: flatbuffers.Builder, testrequirednestedflatbuffer: int):
+def AddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer):
MonsterAddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer)
def MonsterStartTestrequirednestedflatbufferVector(builder, numElems):
@@ -1303,7 +1303,7 @@ def MakeTestrequirednestedflatbufferVectorFromBytes(builder, bytes):
def MonsterAddScalarKeySortedTables(builder, scalarKeySortedTables):
builder.PrependUOffsetTRelativeSlot(50, flatbuffers.number_types.UOffsetTFlags.py_type(scalarKeySortedTables), 0)
-def AddScalarKeySortedTables(builder: flatbuffers.Builder, scalarKeySortedTables: int):
+def AddScalarKeySortedTables(builder, scalarKeySortedTables):
MonsterAddScalarKeySortedTables(builder, scalarKeySortedTables)
def MonsterStartScalarKeySortedTablesVector(builder, numElems):
@@ -1315,67 +1315,67 @@ def StartScalarKeySortedTablesVector(builder, numElems: int) -> int:
def MonsterAddNativeInline(builder, nativeInline):
builder.PrependStructSlot(51, flatbuffers.number_types.UOffsetTFlags.py_type(nativeInline), 0)
-def AddNativeInline(builder: flatbuffers.Builder, nativeInline: Any):
+def AddNativeInline(builder, nativeInline):
MonsterAddNativeInline(builder, nativeInline)
def MonsterAddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault):
builder.PrependUint64Slot(52, longEnumNonEnumDefault, 0)
-def AddLongEnumNonEnumDefault(builder: flatbuffers.Builder, longEnumNonEnumDefault: int):
+def AddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault):
MonsterAddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault)
def MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault):
builder.PrependUint64Slot(53, longEnumNormalDefault, 2)
-def AddLongEnumNormalDefault(builder: flatbuffers.Builder, longEnumNormalDefault: int):
+def AddLongEnumNormalDefault(builder, longEnumNormalDefault):
MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault)
def MonsterAddNanDefault(builder, nanDefault):
builder.PrependFloat32Slot(54, nanDefault, float('nan'))
-def AddNanDefault(builder: flatbuffers.Builder, nanDefault: float):
+def AddNanDefault(builder, nanDefault):
MonsterAddNanDefault(builder, nanDefault)
def MonsterAddInfDefault(builder, infDefault):
builder.PrependFloat32Slot(55, infDefault, float('inf'))
-def AddInfDefault(builder: flatbuffers.Builder, infDefault: float):
+def AddInfDefault(builder, infDefault):
MonsterAddInfDefault(builder, infDefault)
def MonsterAddPositiveInfDefault(builder, positiveInfDefault):
builder.PrependFloat32Slot(56, positiveInfDefault, float('inf'))
-def AddPositiveInfDefault(builder: flatbuffers.Builder, positiveInfDefault: float):
+def AddPositiveInfDefault(builder, positiveInfDefault):
MonsterAddPositiveInfDefault(builder, positiveInfDefault)
def MonsterAddInfinityDefault(builder, infinityDefault):
builder.PrependFloat32Slot(57, infinityDefault, float('inf'))
-def AddInfinityDefault(builder: flatbuffers.Builder, infinityDefault: float):
+def AddInfinityDefault(builder, infinityDefault):
MonsterAddInfinityDefault(builder, infinityDefault)
def MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault):
builder.PrependFloat32Slot(58, positiveInfinityDefault, float('inf'))
-def AddPositiveInfinityDefault(builder: flatbuffers.Builder, positiveInfinityDefault: float):
+def AddPositiveInfinityDefault(builder, positiveInfinityDefault):
MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault)
def MonsterAddNegativeInfDefault(builder, negativeInfDefault):
builder.PrependFloat32Slot(59, negativeInfDefault, float('-inf'))
-def AddNegativeInfDefault(builder: flatbuffers.Builder, negativeInfDefault: float):
+def AddNegativeInfDefault(builder, negativeInfDefault):
MonsterAddNegativeInfDefault(builder, negativeInfDefault)
def MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault):
builder.PrependFloat32Slot(60, negativeInfinityDefault, float('-inf'))
-def AddNegativeInfinityDefault(builder: flatbuffers.Builder, negativeInfinityDefault: float):
+def AddNegativeInfinityDefault(builder, negativeInfinityDefault):
MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault)
def MonsterAddDoubleInfDefault(builder, doubleInfDefault):
builder.PrependFloat64Slot(61, doubleInfDefault, float('inf'))
-def AddDoubleInfDefault(builder: flatbuffers.Builder, doubleInfDefault: float):
+def AddDoubleInfDefault(builder, doubleInfDefault):
MonsterAddDoubleInfDefault(builder, doubleInfDefault)
def MonsterEnd(builder):
diff --git a/tests/MyGame/Example/NestedUnion/Vec3.py b/tests/MyGame/Example/NestedUnion/Vec3.py
index 11feab11..d0f8676f 100644
--- a/tests/MyGame/Example/NestedUnion/Vec3.py
+++ b/tests/MyGame/Example/NestedUnion/Vec3.py
@@ -5,7 +5,7 @@
import flatbuffers
from flatbuffers.compat import import_numpy
from typing import Any
-from .MyGame.Example.NestedUnion.Test import Test
+from MyGame.Example.NestedUnion.Test import Test
from typing import Optional
np = import_numpy()
diff --git a/tests/MyGame/Example/Referrable.py b/tests/MyGame/Example/Referrable.py
index 203c9341..9cc5f572 100644
--- a/tests/MyGame/Example/Referrable.py
+++ b/tests/MyGame/Example/Referrable.py
@@ -44,7 +44,7 @@ def Start(builder):
def ReferrableAddId(builder, id):
builder.PrependUint64Slot(0, id, 0)
-def AddId(builder: flatbuffers.Builder, id: int):
+def AddId(builder, id):
ReferrableAddId(builder, id)
def ReferrableEnd(builder):
diff --git a/tests/MyGame/Example/Stat.py b/tests/MyGame/Example/Stat.py
index 4f175574..ec6b9d9a 100644
--- a/tests/MyGame/Example/Stat.py
+++ b/tests/MyGame/Example/Stat.py
@@ -58,19 +58,19 @@ def Start(builder):
def StatAddId(builder, id):
builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0)
-def AddId(builder: flatbuffers.Builder, id: int):
+def AddId(builder, id):
StatAddId(builder, id)
def StatAddVal(builder, val):
builder.PrependInt64Slot(1, val, 0)
-def AddVal(builder: flatbuffers.Builder, val: int):
+def AddVal(builder, val):
StatAddVal(builder, val)
def StatAddCount(builder, count):
builder.PrependUint16Slot(2, count, 0)
-def AddCount(builder: flatbuffers.Builder, count: int):
+def AddCount(builder, count):
StatAddCount(builder, count)
def StatEnd(builder):
diff --git a/tests/MyGame/Example/TestSimpleTableWithEnum.py b/tests/MyGame/Example/TestSimpleTableWithEnum.py
index 856442c8..520d257f 100644
--- a/tests/MyGame/Example/TestSimpleTableWithEnum.py
+++ b/tests/MyGame/Example/TestSimpleTableWithEnum.py
@@ -44,7 +44,7 @@ def Start(builder):
def TestSimpleTableWithEnumAddColor(builder, color):
builder.PrependUint8Slot(0, color, 2)
-def AddColor(builder: flatbuffers.Builder, color: int):
+def AddColor(builder, color):
TestSimpleTableWithEnumAddColor(builder, color)
def TestSimpleTableWithEnumEnd(builder):
diff --git a/tests/MyGame/Example/TypeAliases.py b/tests/MyGame/Example/TypeAliases.py
index 27c6c4f9..00f90ed5 100644
--- a/tests/MyGame/Example/TypeAliases.py
+++ b/tests/MyGame/Example/TypeAliases.py
@@ -161,67 +161,67 @@ def Start(builder):
def TypeAliasesAddI8(builder, i8):
builder.PrependInt8Slot(0, i8, 0)
-def AddI8(builder: flatbuffers.Builder, i8: int):
+def AddI8(builder, i8):
TypeAliasesAddI8(builder, i8)
def TypeAliasesAddU8(builder, u8):
builder.PrependUint8Slot(1, u8, 0)
-def AddU8(builder: flatbuffers.Builder, u8: int):
+def AddU8(builder, u8):
TypeAliasesAddU8(builder, u8)
def TypeAliasesAddI16(builder, i16):
builder.PrependInt16Slot(2, i16, 0)
-def AddI16(builder: flatbuffers.Builder, i16: int):
+def AddI16(builder, i16):
TypeAliasesAddI16(builder, i16)
def TypeAliasesAddU16(builder, u16):
builder.PrependUint16Slot(3, u16, 0)
-def AddU16(builder: flatbuffers.Builder, u16: int):
+def AddU16(builder, u16):
TypeAliasesAddU16(builder, u16)
def TypeAliasesAddI32(builder, i32):
builder.PrependInt32Slot(4, i32, 0)
-def AddI32(builder: flatbuffers.Builder, i32: int):
+def AddI32(builder, i32):
TypeAliasesAddI32(builder, i32)
def TypeAliasesAddU32(builder, u32):
builder.PrependUint32Slot(5, u32, 0)
-def AddU32(builder: flatbuffers.Builder, u32: int):
+def AddU32(builder, u32):
TypeAliasesAddU32(builder, u32)
def TypeAliasesAddI64(builder, i64):
builder.PrependInt64Slot(6, i64, 0)
-def AddI64(builder: flatbuffers.Builder, i64: int):
+def AddI64(builder, i64):
TypeAliasesAddI64(builder, i64)
def TypeAliasesAddU64(builder, u64):
builder.PrependUint64Slot(7, u64, 0)
-def AddU64(builder: flatbuffers.Builder, u64: int):
+def AddU64(builder, u64):
TypeAliasesAddU64(builder, u64)
def TypeAliasesAddF32(builder, f32):
builder.PrependFloat32Slot(8, f32, 0.0)
-def AddF32(builder: flatbuffers.Builder, f32: float):
+def AddF32(builder, f32):
TypeAliasesAddF32(builder, f32)
def TypeAliasesAddF64(builder, f64):
builder.PrependFloat64Slot(9, f64, 0.0)
-def AddF64(builder: flatbuffers.Builder, f64: float):
+def AddF64(builder, f64):
TypeAliasesAddF64(builder, f64)
def TypeAliasesAddV8(builder, v8):
builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(v8), 0)
-def AddV8(builder: flatbuffers.Builder, v8: int):
+def AddV8(builder, v8):
TypeAliasesAddV8(builder, v8)
def TypeAliasesStartV8Vector(builder, numElems):
@@ -233,7 +233,7 @@ def StartV8Vector(builder, numElems: int) -> int:
def TypeAliasesAddVf64(builder, vf64):
builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(vf64), 0)
-def AddVf64(builder: flatbuffers.Builder, vf64: int):
+def AddVf64(builder, vf64):
TypeAliasesAddVf64(builder, vf64)
def TypeAliasesStartVf64Vector(builder, numElems):
diff --git a/tests/PythonTest.sh b/tests/PythonTest.sh
index 925bd95e..fc64e9f5 100755
--- a/tests/PythonTest.sh
+++ b/tests/PythonTest.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/bin/bash
#
# Copyright 2014 Google Inc. All rights reserved.
#
@@ -14,10 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -eu
+
pushd "$(dirname $0)" >/dev/null
test_dir="$(pwd)"
gen_code_path=${test_dir}
-runtime_library_dir=${test_dir}/../../python
+runtime_library_dir=${test_dir}/../python
# Emit Python code for the example schema in the test dir:
${test_dir}/../flatc -p -o ${gen_code_path} -I include_test monster_test.fbs --gen-object-api
diff --git a/tests/monster_test_generated.py b/tests/monster_test_generated.py
index 2acdf6ce..f2b62cb2 100644
--- a/tests/monster_test_generated.py
+++ b/tests/monster_test_generated.py
@@ -1050,7 +1050,7 @@ class Monster(object):
def TestnestedflatbufferNestedRoot(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
if o != 0:
- from .MyGame.Example.Monster import Monster
+ from MyGame.Example.Monster import Monster
return Monster.GetRootAs(self._tab.Bytes, self._tab.Vector(o))
return 0
@@ -1581,7 +1581,7 @@ class Monster(object):
def TestrequirednestedflatbufferNestedRoot(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(102))
if o != 0:
- from .MyGame.Example.Monster import Monster
+ from MyGame.Example.Monster import Monster
return Monster.GetRootAs(self._tab.Bytes, self._tab.Vector(o))
return 0
diff --git a/tests/optional_scalars/ScalarStuff.py b/tests/optional_scalars/ScalarStuff.py
index 07737d29..dda052f3 100644
--- a/tests/optional_scalars/ScalarStuff.py
+++ b/tests/optional_scalars/ScalarStuff.py
@@ -289,217 +289,217 @@ def Start(builder):
def ScalarStuffAddJustI8(builder, justI8):
builder.PrependInt8Slot(0, justI8, 0)
-def AddJustI8(builder: flatbuffers.Builder, justI8: int):
+def AddJustI8(builder, justI8):
ScalarStuffAddJustI8(builder, justI8)
def ScalarStuffAddMaybeI8(builder, maybeI8):
builder.PrependInt8Slot(1, maybeI8, None)
-def AddMaybeI8(builder: flatbuffers.Builder, maybeI8: int):
+def AddMaybeI8(builder, maybeI8):
ScalarStuffAddMaybeI8(builder, maybeI8)
def ScalarStuffAddDefaultI8(builder, defaultI8):
builder.PrependInt8Slot(2, defaultI8, 42)
-def AddDefaultI8(builder: flatbuffers.Builder, defaultI8: int):
+def AddDefaultI8(builder, defaultI8):
ScalarStuffAddDefaultI8(builder, defaultI8)
def ScalarStuffAddJustU8(builder, justU8):
builder.PrependUint8Slot(3, justU8, 0)
-def AddJustU8(builder: flatbuffers.Builder, justU8: int):
+def AddJustU8(builder, justU8):
ScalarStuffAddJustU8(builder, justU8)
def ScalarStuffAddMaybeU8(builder, maybeU8):
builder.PrependUint8Slot(4, maybeU8, None)
-def AddMaybeU8(builder: flatbuffers.Builder, maybeU8: int):
+def AddMaybeU8(builder, maybeU8):
ScalarStuffAddMaybeU8(builder, maybeU8)
def ScalarStuffAddDefaultU8(builder, defaultU8):
builder.PrependUint8Slot(5, defaultU8, 42)
-def AddDefaultU8(builder: flatbuffers.Builder, defaultU8: int):
+def AddDefaultU8(builder, defaultU8):
ScalarStuffAddDefaultU8(builder, defaultU8)
def ScalarStuffAddJustI16(builder, justI16):
builder.PrependInt16Slot(6, justI16, 0)
-def AddJustI16(builder: flatbuffers.Builder, justI16: int):
+def AddJustI16(builder, justI16):
ScalarStuffAddJustI16(builder, justI16)
def ScalarStuffAddMaybeI16(builder, maybeI16):
builder.PrependInt16Slot(7, maybeI16, None)
-def AddMaybeI16(builder: flatbuffers.Builder, maybeI16: int):
+def AddMaybeI16(builder, maybeI16):
ScalarStuffAddMaybeI16(builder, maybeI16)
def ScalarStuffAddDefaultI16(builder, defaultI16):
builder.PrependInt16Slot(8, defaultI16, 42)
-def AddDefaultI16(builder: flatbuffers.Builder, defaultI16: int):
+def AddDefaultI16(builder, defaultI16):
ScalarStuffAddDefaultI16(builder, defaultI16)
def ScalarStuffAddJustU16(builder, justU16):
builder.PrependUint16Slot(9, justU16, 0)
-def AddJustU16(builder: flatbuffers.Builder, justU16: int):
+def AddJustU16(builder, justU16):
ScalarStuffAddJustU16(builder, justU16)
def ScalarStuffAddMaybeU16(builder, maybeU16):
builder.PrependUint16Slot(10, maybeU16, None)
-def AddMaybeU16(builder: flatbuffers.Builder, maybeU16: int):
+def AddMaybeU16(builder, maybeU16):
ScalarStuffAddMaybeU16(builder, maybeU16)
def ScalarStuffAddDefaultU16(builder, defaultU16):
builder.PrependUint16Slot(11, defaultU16, 42)
-def AddDefaultU16(builder: flatbuffers.Builder, defaultU16: int):
+def AddDefaultU16(builder, defaultU16):
ScalarStuffAddDefaultU16(builder, defaultU16)
def ScalarStuffAddJustI32(builder, justI32):
builder.PrependInt32Slot(12, justI32, 0)
-def AddJustI32(builder: flatbuffers.Builder, justI32: int):
+def AddJustI32(builder, justI32):
ScalarStuffAddJustI32(builder, justI32)
def ScalarStuffAddMaybeI32(builder, maybeI32):
builder.PrependInt32Slot(13, maybeI32, None)
-def AddMaybeI32(builder: flatbuffers.Builder, maybeI32: int):
+def AddMaybeI32(builder, maybeI32):
ScalarStuffAddMaybeI32(builder, maybeI32)
def ScalarStuffAddDefaultI32(builder, defaultI32):
builder.PrependInt32Slot(14, defaultI32, 42)
-def AddDefaultI32(builder: flatbuffers.Builder, defaultI32: int):
+def AddDefaultI32(builder, defaultI32):
ScalarStuffAddDefaultI32(builder, defaultI32)
def ScalarStuffAddJustU32(builder, justU32):
builder.PrependUint32Slot(15, justU32, 0)
-def AddJustU32(builder: flatbuffers.Builder, justU32: int):
+def AddJustU32(builder, justU32):
ScalarStuffAddJustU32(builder, justU32)
def ScalarStuffAddMaybeU32(builder, maybeU32):
builder.PrependUint32Slot(16, maybeU32, None)
-def AddMaybeU32(builder: flatbuffers.Builder, maybeU32: int):
+def AddMaybeU32(builder, maybeU32):
ScalarStuffAddMaybeU32(builder, maybeU32)
def ScalarStuffAddDefaultU32(builder, defaultU32):
builder.PrependUint32Slot(17, defaultU32, 42)
-def AddDefaultU32(builder: flatbuffers.Builder, defaultU32: int):
+def AddDefaultU32(builder, defaultU32):
ScalarStuffAddDefaultU32(builder, defaultU32)
def ScalarStuffAddJustI64(builder, justI64):
builder.PrependInt64Slot(18, justI64, 0)
-def AddJustI64(builder: flatbuffers.Builder, justI64: int):
+def AddJustI64(builder, justI64):
ScalarStuffAddJustI64(builder, justI64)
def ScalarStuffAddMaybeI64(builder, maybeI64):
builder.PrependInt64Slot(19, maybeI64, None)
-def AddMaybeI64(builder: flatbuffers.Builder, maybeI64: int):
+def AddMaybeI64(builder, maybeI64):
ScalarStuffAddMaybeI64(builder, maybeI64)
def ScalarStuffAddDefaultI64(builder, defaultI64):
builder.PrependInt64Slot(20, defaultI64, 42)
-def AddDefaultI64(builder: flatbuffers.Builder, defaultI64: int):
+def AddDefaultI64(builder, defaultI64):
ScalarStuffAddDefaultI64(builder, defaultI64)
def ScalarStuffAddJustU64(builder, justU64):
builder.PrependUint64Slot(21, justU64, 0)
-def AddJustU64(builder: flatbuffers.Builder, justU64: int):
+def AddJustU64(builder, justU64):
ScalarStuffAddJustU64(builder, justU64)
def ScalarStuffAddMaybeU64(builder, maybeU64):
builder.PrependUint64Slot(22, maybeU64, None)
-def AddMaybeU64(builder: flatbuffers.Builder, maybeU64: int):
+def AddMaybeU64(builder, maybeU64):
ScalarStuffAddMaybeU64(builder, maybeU64)
def ScalarStuffAddDefaultU64(builder, defaultU64):
builder.PrependUint64Slot(23, defaultU64, 42)
-def AddDefaultU64(builder: flatbuffers.Builder, defaultU64: int):
+def AddDefaultU64(builder, defaultU64):
ScalarStuffAddDefaultU64(builder, defaultU64)
def ScalarStuffAddJustF32(builder, justF32):
builder.PrependFloat32Slot(24, justF32, 0.0)
-def AddJustF32(builder: flatbuffers.Builder, justF32: float):
+def AddJustF32(builder, justF32):
ScalarStuffAddJustF32(builder, justF32)
def ScalarStuffAddMaybeF32(builder, maybeF32):
builder.PrependFloat32Slot(25, maybeF32, None)
-def AddMaybeF32(builder: flatbuffers.Builder, maybeF32: float):
+def AddMaybeF32(builder, maybeF32):
ScalarStuffAddMaybeF32(builder, maybeF32)
def ScalarStuffAddDefaultF32(builder, defaultF32):
builder.PrependFloat32Slot(26, defaultF32, 42.0)
-def AddDefaultF32(builder: flatbuffers.Builder, defaultF32: float):
+def AddDefaultF32(builder, defaultF32):
ScalarStuffAddDefaultF32(builder, defaultF32)
def ScalarStuffAddJustF64(builder, justF64):
builder.PrependFloat64Slot(27, justF64, 0.0)
-def AddJustF64(builder: flatbuffers.Builder, justF64: float):
+def AddJustF64(builder, justF64):
ScalarStuffAddJustF64(builder, justF64)
def ScalarStuffAddMaybeF64(builder, maybeF64):
builder.PrependFloat64Slot(28, maybeF64, None)
-def AddMaybeF64(builder: flatbuffers.Builder, maybeF64: float):
+def AddMaybeF64(builder, maybeF64):
ScalarStuffAddMaybeF64(builder, maybeF64)
def ScalarStuffAddDefaultF64(builder, defaultF64):
builder.PrependFloat64Slot(29, defaultF64, 42.0)
-def AddDefaultF64(builder: flatbuffers.Builder, defaultF64: float):
+def AddDefaultF64(builder, defaultF64):
ScalarStuffAddDefaultF64(builder, defaultF64)
def ScalarStuffAddJustBool(builder, justBool):
builder.PrependBoolSlot(30, justBool, 0)
-def AddJustBool(builder: flatbuffers.Builder, justBool: bool):
+def AddJustBool(builder, justBool):
ScalarStuffAddJustBool(builder, justBool)
def ScalarStuffAddMaybeBool(builder, maybeBool):
builder.PrependBoolSlot(31, maybeBool, None)
-def AddMaybeBool(builder: flatbuffers.Builder, maybeBool: bool):
+def AddMaybeBool(builder, maybeBool):
ScalarStuffAddMaybeBool(builder, maybeBool)
def ScalarStuffAddDefaultBool(builder, defaultBool):
builder.PrependBoolSlot(32, defaultBool, 1)
-def AddDefaultBool(builder: flatbuffers.Builder, defaultBool: bool):
+def AddDefaultBool(builder, defaultBool):
ScalarStuffAddDefaultBool(builder, defaultBool)
def ScalarStuffAddJustEnum(builder, justEnum):
builder.PrependInt8Slot(33, justEnum, 0)
-def AddJustEnum(builder: flatbuffers.Builder, justEnum: int):
+def AddJustEnum(builder, justEnum):
ScalarStuffAddJustEnum(builder, justEnum)
def ScalarStuffAddMaybeEnum(builder, maybeEnum):
builder.PrependInt8Slot(34, maybeEnum, None)
-def AddMaybeEnum(builder: flatbuffers.Builder, maybeEnum: int):
+def AddMaybeEnum(builder, maybeEnum):
ScalarStuffAddMaybeEnum(builder, maybeEnum)
def ScalarStuffAddDefaultEnum(builder, defaultEnum):
builder.PrependInt8Slot(35, defaultEnum, 1)
-def AddDefaultEnum(builder: flatbuffers.Builder, defaultEnum: int):
+def AddDefaultEnum(builder, defaultEnum):
ScalarStuffAddDefaultEnum(builder, defaultEnum)
def ScalarStuffEnd(builder):