summaryrefslogtreecommitdiff
path: root/tests/MyGame/Example
diff options
context:
space:
mode:
authorMax Burke <max@urbanlogiq.com>2023-04-28 09:38:29 -0700
committerGitHub <noreply@github.com>2023-04-28 09:38:29 -0700
commita397dd7e8c3137fecc8b686b3efb5c31bf1d1b1e (patch)
treed9841de95dff3516df30bd0959a51d332eb79f69 /tests/MyGame/Example
parent6eae49a79a1ac30c88255a9bea9c344589f7249d (diff)
downloadflatbuffers-a397dd7e8c3137fecc8b686b3efb5c31bf1d1b1e.tar.gz
flatbuffers-a397dd7e8c3137fecc8b686b3efb5c31bf1d1b1e.tar.bz2
flatbuffers-a397dd7e8c3137fecc8b686b3efb5c31bf1d1b1e.zip
Optionally generate Python type annotations (#7858)
* optionally generate type prefixes and suffixes for python code * fix codegen error when qualified name is empty * WIP: Python typing * more progress towards python typing * Further iterate on Python generated code typing * clang-format * Regenerate code * add documentation for Python type annotations option * generate code with Python type annotations * handle forward references * clang-format
Diffstat (limited to 'tests/MyGame/Example')
-rw-r--r--tests/MyGame/Example/ArrayStruct.py21
-rw-r--r--tests/MyGame/Example/ArrayTable.py30
-rw-r--r--tests/MyGame/Example/Monster.py438
-rw-r--r--tests/MyGame/Example/NestedStruct.py17
-rw-r--r--tests/MyGame/Example/NestedUnion/NestedUnionTest.py56
-rw-r--r--tests/MyGame/Example/NestedUnion/Test.py5
-rw-r--r--tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py25
-rw-r--r--tests/MyGame/Example/NestedUnion/Vec3.py70
-rw-r--r--tests/MyGame/Example/Referrable.py10
-rw-r--r--tests/MyGame/Example/Stat.py22
-rw-r--r--tests/MyGame/Example/TestSimpleTableWithEnum.py10
-rw-r--r--tests/MyGame/Example/TypeAliases.py80
12 files changed, 397 insertions, 387 deletions
diff --git a/tests/MyGame/Example/ArrayStruct.py b/tests/MyGame/Example/ArrayStruct.py
index d80f8425..be85ec89 100644
--- a/tests/MyGame/Example/ArrayStruct.py
+++ b/tests/MyGame/Example/ArrayStruct.py
@@ -4,17 +4,19 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
+from .MyGame.Example.NestedStruct import NestedStruct
np = import_numpy()
class ArrayStruct(object):
__slots__ = ['_tab']
@classmethod
- def SizeOf(cls):
+ def SizeOf(cls) -> int:
return 160
# ArrayStruct
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# ArrayStruct
@@ -33,28 +35,27 @@ class ArrayStruct(object):
return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int32Flags, self._tab.Pos + 4, self.BLength())
# ArrayStruct
- def BLength(self):
+ def BLength(self) -> int:
return 15
# ArrayStruct
- def BIsNone(self):
+ def BIsNone(self) -> bool:
return False
# ArrayStruct
def C(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(64))
# ArrayStruct
- def D(self, i: int):
- from MyGame.Example.NestedStruct import NestedStruct
+ def D(self, i: int) -> NestedStruct:
obj = NestedStruct()
obj.Init(self._tab.Bytes, self._tab.Pos + 72 + i * 32)
return obj
# ArrayStruct
- def DLength(self):
+ def DLength(self) -> int:
return 2
# ArrayStruct
- def DIsNone(self):
+ def DIsNone(self) -> bool:
return False
# ArrayStruct
@@ -73,11 +74,11 @@ class ArrayStruct(object):
return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int64Flags, self._tab.Pos + 144, self.FLength())
# ArrayStruct
- def FLength(self):
+ def FLength(self) -> int:
return 2
# ArrayStruct
- def FIsNone(self):
+ def FIsNone(self) -> bool:
return False
diff --git a/tests/MyGame/Example/ArrayTable.py b/tests/MyGame/Example/ArrayTable.py
index 7f4051f5..90fbb4a4 100644
--- a/tests/MyGame/Example/ArrayTable.py
+++ b/tests/MyGame/Example/ArrayTable.py
@@ -4,13 +4,16 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
+from .MyGame.Example.ArrayStruct import ArrayStruct
+from typing import Optional
np = import_numpy()
class ArrayTable(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAs(cls, buf, offset=0):
+ def GetRootAs(cls, buf, offset: int = 0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ArrayTable()
x.Init(buf, n + offset)
@@ -25,36 +28,35 @@ class ArrayTable(object):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x41\x52\x52\x54", size_prefixed=size_prefixed)
# ArrayTable
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# ArrayTable
- def A(self):
+ def A(self) -> Optional[ArrayStruct]:
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
x = o + self._tab.Pos
- from MyGame.Example.ArrayStruct import ArrayStruct
obj = ArrayStruct()
obj.Init(self._tab.Bytes, x)
return obj
return None
-def ArrayTableStart(builder):
- return builder.StartObject(1)
+def ArrayTableStart(builder: flatbuffers.Builder):
+ builder.StartObject(1)
-def Start(builder):
- return ArrayTableStart(builder)
+def Start(builder: flatbuffers.Builder):
+ ArrayTableStart(builder)
-def ArrayTableAddA(builder, a):
- return builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(a), 0)
+def ArrayTableAddA(builder: flatbuffers.Builder, a: Any):
+ builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(a), 0)
-def AddA(builder, a):
- return ArrayTableAddA(builder, a)
+def AddA(builder: flatbuffers.Builder, a: Any):
+ ArrayTableAddA(builder, a)
-def ArrayTableEnd(builder):
+def ArrayTableEnd(builder: flatbuffers.Builder) -> int:
return builder.EndObject()
-def End(builder):
+def End(builder: flatbuffers.Builder) -> int:
return ArrayTableEnd(builder)
import MyGame.Example.ArrayStruct
diff --git a/tests/MyGame/Example/Monster.py b/tests/MyGame/Example/Monster.py
index bde02b4a..f216f84f 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
@@ -873,117 +873,117 @@ class Monster(object):
return float('inf')
def MonsterStart(builder):
- return builder.StartObject(62)
+ builder.StartObject(62)
def Start(builder):
- return MonsterStart(builder)
+ MonsterStart(builder)
def MonsterAddPos(builder, pos):
- return builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0)
+ builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0)
-def AddPos(builder, pos):
- return MonsterAddPos(builder, pos)
+def AddPos(builder: flatbuffers.Builder, pos: Any):
+ MonsterAddPos(builder, pos)
def MonsterAddMana(builder, mana):
- return builder.PrependInt16Slot(1, mana, 150)
+ builder.PrependInt16Slot(1, mana, 150)
-def AddMana(builder, mana):
- return MonsterAddMana(builder, mana)
+def AddMana(builder: flatbuffers.Builder, mana: int):
+ MonsterAddMana(builder, mana)
def MonsterAddHp(builder, hp):
- return builder.PrependInt16Slot(2, hp, 100)
+ builder.PrependInt16Slot(2, hp, 100)
-def AddHp(builder, hp):
- return MonsterAddHp(builder, hp)
+def AddHp(builder: flatbuffers.Builder, hp: int):
+ MonsterAddHp(builder, hp)
def MonsterAddName(builder, name):
- return builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
+ builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
-def AddName(builder, name):
- return MonsterAddName(builder, name)
+def AddName(builder: flatbuffers.Builder, name: int):
+ MonsterAddName(builder, name)
def MonsterAddInventory(builder, inventory):
- return builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(inventory), 0)
+ builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(inventory), 0)
-def AddInventory(builder, inventory):
- return MonsterAddInventory(builder, inventory)
+def AddInventory(builder: flatbuffers.Builder, inventory: int):
+ MonsterAddInventory(builder, inventory)
def MonsterStartInventoryVector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartInventoryVector(builder, numElems):
+def StartInventoryVector(builder, numElems: int) -> int:
return MonsterStartInventoryVector(builder, numElems)
def MonsterAddColor(builder, color):
- return builder.PrependUint8Slot(6, color, 8)
+ builder.PrependUint8Slot(6, color, 8)
-def AddColor(builder, color):
- return MonsterAddColor(builder, color)
+def AddColor(builder: flatbuffers.Builder, color: int):
+ MonsterAddColor(builder, color)
def MonsterAddTestType(builder, testType):
- return builder.PrependUint8Slot(7, testType, 0)
+ builder.PrependUint8Slot(7, testType, 0)
-def AddTestType(builder, testType):
- return MonsterAddTestType(builder, testType)
+def AddTestType(builder: flatbuffers.Builder, testType: int):
+ MonsterAddTestType(builder, testType)
def MonsterAddTest(builder, test):
- return builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(test), 0)
+ builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(test), 0)
-def AddTest(builder, test):
- return MonsterAddTest(builder, test)
+def AddTest(builder: flatbuffers.Builder, test: int):
+ MonsterAddTest(builder, test)
def MonsterAddTest4(builder, test4):
- return builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(test4), 0)
+ builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(test4), 0)
-def AddTest4(builder, test4):
- return MonsterAddTest4(builder, test4)
+def AddTest4(builder: flatbuffers.Builder, test4: int):
+ MonsterAddTest4(builder, test4)
def MonsterStartTest4Vector(builder, numElems):
return builder.StartVector(4, numElems, 2)
-def StartTest4Vector(builder, numElems):
+def StartTest4Vector(builder, numElems: int) -> int:
return MonsterStartTest4Vector(builder, numElems)
def MonsterAddTestarrayofstring(builder, testarrayofstring):
- return builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring), 0)
+ builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring), 0)
-def AddTestarrayofstring(builder, testarrayofstring):
- return MonsterAddTestarrayofstring(builder, testarrayofstring)
+def AddTestarrayofstring(builder: flatbuffers.Builder, testarrayofstring: int):
+ MonsterAddTestarrayofstring(builder, testarrayofstring)
def MonsterStartTestarrayofstringVector(builder, numElems):
return builder.StartVector(4, numElems, 4)
-def StartTestarrayofstringVector(builder, numElems):
+def StartTestarrayofstringVector(builder, numElems: int) -> int:
return MonsterStartTestarrayofstringVector(builder, numElems)
def MonsterAddTestarrayoftables(builder, testarrayoftables):
- return builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayoftables), 0)
+ builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayoftables), 0)
-def AddTestarrayoftables(builder, testarrayoftables):
- return MonsterAddTestarrayoftables(builder, testarrayoftables)
+def AddTestarrayoftables(builder: flatbuffers.Builder, testarrayoftables: int):
+ MonsterAddTestarrayoftables(builder, testarrayoftables)
def MonsterStartTestarrayoftablesVector(builder, numElems):
return builder.StartVector(4, numElems, 4)
-def StartTestarrayoftablesVector(builder, numElems):
+def StartTestarrayoftablesVector(builder, numElems: int) -> int:
return MonsterStartTestarrayoftablesVector(builder, numElems)
def MonsterAddEnemy(builder, enemy):
- return builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(enemy), 0)
+ builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(enemy), 0)
-def AddEnemy(builder, enemy):
- return MonsterAddEnemy(builder, enemy)
+def AddEnemy(builder: flatbuffers.Builder, enemy: int):
+ MonsterAddEnemy(builder, enemy)
def MonsterAddTestnestedflatbuffer(builder, testnestedflatbuffer):
- return builder.PrependUOffsetTRelativeSlot(13, flatbuffers.number_types.UOffsetTFlags.py_type(testnestedflatbuffer), 0)
+ builder.PrependUOffsetTRelativeSlot(13, flatbuffers.number_types.UOffsetTFlags.py_type(testnestedflatbuffer), 0)
-def AddTestnestedflatbuffer(builder, testnestedflatbuffer):
- return MonsterAddTestnestedflatbuffer(builder, testnestedflatbuffer)
+def AddTestnestedflatbuffer(builder: flatbuffers.Builder, testnestedflatbuffer: int):
+ MonsterAddTestnestedflatbuffer(builder, testnestedflatbuffer)
def MonsterStartTestnestedflatbufferVector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartTestnestedflatbufferVector(builder, numElems):
+def StartTestnestedflatbufferVector(builder, numElems: int) -> int:
return MonsterStartTestnestedflatbufferVector(builder, numElems)
def MonsterMakeTestnestedflatbufferVectorFromBytes(builder, bytes):
@@ -994,303 +994,303 @@ def MonsterMakeTestnestedflatbufferVectorFromBytes(builder, bytes):
def MakeTestnestedflatbufferVectorFromBytes(builder, bytes):
return MonsterMakeTestnestedflatbufferVectorFromBytes(builder, bytes)
def MonsterAddTestempty(builder, testempty):
- return builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(testempty), 0)
+ builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(testempty), 0)
-def AddTestempty(builder, testempty):
- return MonsterAddTestempty(builder, testempty)
+def AddTestempty(builder: flatbuffers.Builder, testempty: int):
+ MonsterAddTestempty(builder, testempty)
def MonsterAddTestbool(builder, testbool):
- return builder.PrependBoolSlot(15, testbool, 0)
+ builder.PrependBoolSlot(15, testbool, 0)
-def AddTestbool(builder, testbool):
- return MonsterAddTestbool(builder, testbool)
+def AddTestbool(builder: flatbuffers.Builder, testbool: bool):
+ MonsterAddTestbool(builder, testbool)
def MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1):
- return builder.PrependInt32Slot(16, testhashs32Fnv1, 0)
+ builder.PrependInt32Slot(16, testhashs32Fnv1, 0)
-def AddTesthashs32Fnv1(builder, testhashs32Fnv1):
- return MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1)
+def AddTesthashs32Fnv1(builder: flatbuffers.Builder, testhashs32Fnv1: int):
+ MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1)
def MonsterAddTesthashu32Fnv1(builder, testhashu32Fnv1):
- return builder.PrependUint32Slot(17, testhashu32Fnv1, 0)
+ builder.PrependUint32Slot(17, testhashu32Fnv1, 0)
-def AddTesthashu32Fnv1(builder, testhashu32Fnv1):
- return MonsterAddTesthashu32Fnv1(builder, testhashu32Fnv1)
+def AddTesthashu32Fnv1(builder: flatbuffers.Builder, testhashu32Fnv1: int):
+ MonsterAddTesthashu32Fnv1(builder, testhashu32Fnv1)
def MonsterAddTesthashs64Fnv1(builder, testhashs64Fnv1):
- return builder.PrependInt64Slot(18, testhashs64Fnv1, 0)
+ builder.PrependInt64Slot(18, testhashs64Fnv1, 0)
-def AddTesthashs64Fnv1(builder, testhashs64Fnv1):
- return MonsterAddTesthashs64Fnv1(builder, testhashs64Fnv1)
+def AddTesthashs64Fnv1(builder: flatbuffers.Builder, testhashs64Fnv1: int):
+ MonsterAddTesthashs64Fnv1(builder, testhashs64Fnv1)
def MonsterAddTesthashu64Fnv1(builder, testhashu64Fnv1):
- return builder.PrependUint64Slot(19, testhashu64Fnv1, 0)
+ builder.PrependUint64Slot(19, testhashu64Fnv1, 0)
-def AddTesthashu64Fnv1(builder, testhashu64Fnv1):
- return MonsterAddTesthashu64Fnv1(builder, testhashu64Fnv1)
+def AddTesthashu64Fnv1(builder: flatbuffers.Builder, testhashu64Fnv1: int):
+ MonsterAddTesthashu64Fnv1(builder, testhashu64Fnv1)
def MonsterAddTesthashs32Fnv1a(builder, testhashs32Fnv1a):
- return builder.PrependInt32Slot(20, testhashs32Fnv1a, 0)
+ builder.PrependInt32Slot(20, testhashs32Fnv1a, 0)
-def AddTesthashs32Fnv1a(builder, testhashs32Fnv1a):
- return MonsterAddTesthashs32Fnv1a(builder, testhashs32Fnv1a)
+def AddTesthashs32Fnv1a(builder: flatbuffers.Builder, testhashs32Fnv1a: int):
+ MonsterAddTesthashs32Fnv1a(builder, testhashs32Fnv1a)
def MonsterAddTesthashu32Fnv1a(builder, testhashu32Fnv1a):
- return builder.PrependUint32Slot(21, testhashu32Fnv1a, 0)
+ builder.PrependUint32Slot(21, testhashu32Fnv1a, 0)
-def AddTesthashu32Fnv1a(builder, testhashu32Fnv1a):
- return MonsterAddTesthashu32Fnv1a(builder, testhashu32Fnv1a)
+def AddTesthashu32Fnv1a(builder: flatbuffers.Builder, testhashu32Fnv1a: int):
+ MonsterAddTesthashu32Fnv1a(builder, testhashu32Fnv1a)
def MonsterAddTesthashs64Fnv1a(builder, testhashs64Fnv1a):
- return builder.PrependInt64Slot(22, testhashs64Fnv1a, 0)
+ builder.PrependInt64Slot(22, testhashs64Fnv1a, 0)
-def AddTesthashs64Fnv1a(builder, testhashs64Fnv1a):
- return MonsterAddTesthashs64Fnv1a(builder, testhashs64Fnv1a)
+def AddTesthashs64Fnv1a(builder: flatbuffers.Builder, testhashs64Fnv1a: int):
+ MonsterAddTesthashs64Fnv1a(builder, testhashs64Fnv1a)
def MonsterAddTesthashu64Fnv1a(builder, testhashu64Fnv1a):
- return builder.PrependUint64Slot(23, testhashu64Fnv1a, 0)
+ builder.PrependUint64Slot(23, testhashu64Fnv1a, 0)
-def AddTesthashu64Fnv1a(builder, testhashu64Fnv1a):
- return MonsterAddTesthashu64Fnv1a(builder, testhashu64Fnv1a)
+def AddTesthashu64Fnv1a(builder: flatbuffers.Builder, testhashu64Fnv1a: int):
+ MonsterAddTesthashu64Fnv1a(builder, testhashu64Fnv1a)
def MonsterAddTestarrayofbools(builder, testarrayofbools):
- return builder.PrependUOffsetTRelativeSlot(24, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofbools), 0)
+ builder.PrependUOffsetTRelativeSlot(24, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofbools), 0)
-def AddTestarrayofbools(builder, testarrayofbools):
- return MonsterAddTestarrayofbools(builder, testarrayofbools)
+def AddTestarrayofbools(builder: flatbuffers.Builder, testarrayofbools: int):
+ MonsterAddTestarrayofbools(builder, testarrayofbools)
def MonsterStartTestarrayofboolsVector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartTestarrayofboolsVector(builder, numElems):
+def StartTestarrayofboolsVector(builder, numElems: int) -> int:
return MonsterStartTestarrayofboolsVector(builder, numElems)
def MonsterAddTestf(builder, testf):
- return builder.PrependFloat32Slot(25, testf, 3.14159)
+ builder.PrependFloat32Slot(25, testf, 3.14159)
-def AddTestf(builder, testf):
- return MonsterAddTestf(builder, testf)
+def AddTestf(builder: flatbuffers.Builder, testf: float):
+ MonsterAddTestf(builder, testf)
def MonsterAddTestf2(builder, testf2):
- return builder.PrependFloat32Slot(26, testf2, 3.0)
+ builder.PrependFloat32Slot(26, testf2, 3.0)
-def AddTestf2(builder, testf2):
- return MonsterAddTestf2(builder, testf2)
+def AddTestf2(builder: flatbuffers.Builder, testf2: float):
+ MonsterAddTestf2(builder, testf2)
def MonsterAddTestf3(builder, testf3):
- return builder.PrependFloat32Slot(27, testf3, 0.0)
+ builder.PrependFloat32Slot(27, testf3, 0.0)
-def AddTestf3(builder, testf3):
- return MonsterAddTestf3(builder, testf3)
+def AddTestf3(builder: flatbuffers.Builder, testf3: float):
+ MonsterAddTestf3(builder, testf3)
def MonsterAddTestarrayofstring2(builder, testarrayofstring2):
- return builder.PrependUOffsetTRelativeSlot(28, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring2), 0)
+ builder.PrependUOffsetTRelativeSlot(28, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring2), 0)
-def AddTestarrayofstring2(builder, testarrayofstring2):
- return MonsterAddTestarrayofstring2(builder, testarrayofstring2)
+def AddTestarrayofstring2(builder: flatbuffers.Builder, testarrayofstring2: int):
+ MonsterAddTestarrayofstring2(builder, testarrayofstring2)
def MonsterStartTestarrayofstring2Vector(builder, numElems):
return builder.StartVector(4, numElems, 4)
-def StartTestarrayofstring2Vector(builder, numElems):
+def StartTestarrayofstring2Vector(builder, numElems: int) -> int:
return MonsterStartTestarrayofstring2Vector(builder, numElems)
def MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstruct):
- return builder.PrependUOffsetTRelativeSlot(29, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofsortedstruct), 0)
+ builder.PrependUOffsetTRelativeSlot(29, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofsortedstruct), 0)
-def AddTestarrayofsortedstruct(builder, testarrayofsortedstruct):
- return MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstruct)
+def AddTestarrayofsortedstruct(builder: flatbuffers.Builder, testarrayofsortedstruct: int):
+ MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstruct)
def MonsterStartTestarrayofsortedstructVector(builder, numElems):
return builder.StartVector(8, numElems, 4)
-def StartTestarrayofsortedstructVector(builder, numElems):
+def StartTestarrayofsortedstructVector(builder, numElems: int) -> int:
return MonsterStartTestarrayofsortedstructVector(builder, numElems)
def MonsterAddFlex(builder, flex):
- return builder.PrependUOffsetTRelativeSlot(30, flatbuffers.number_types.UOffsetTFlags.py_type(flex), 0)
+ builder.PrependUOffsetTRelativeSlot(30, flatbuffers.number_types.UOffsetTFlags.py_type(flex), 0)
-def AddFlex(builder, flex):
- return MonsterAddFlex(builder, flex)
+def AddFlex(builder: flatbuffers.Builder, flex: int):
+ MonsterAddFlex(builder, flex)
def MonsterStartFlexVector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartFlexVector(builder, numElems):
+def StartFlexVector(builder, numElems: int) -> int:
return MonsterStartFlexVector(builder, numElems)
def MonsterAddTest5(builder, test5):
- return builder.PrependUOffsetTRelativeSlot(31, flatbuffers.number_types.UOffsetTFlags.py_type(test5), 0)
+ builder.PrependUOffsetTRelativeSlot(31, flatbuffers.number_types.UOffsetTFlags.py_type(test5), 0)
-def AddTest5(builder, test5):
- return MonsterAddTest5(builder, test5)
+def AddTest5(builder: flatbuffers.Builder, test5: int):
+ MonsterAddTest5(builder, test5)
def MonsterStartTest5Vector(builder, numElems):
return builder.StartVector(4, numElems, 2)
-def StartTest5Vector(builder, numElems):
+def StartTest5Vector(builder, numElems: int) -> int:
return MonsterStartTest5Vector(builder, numElems)
def MonsterAddVectorOfLongs(builder, vectorOfLongs):
- return builder.PrependUOffsetTRelativeSlot(32, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfLongs), 0)
+ builder.PrependUOffsetTRelativeSlot(32, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfLongs), 0)
-def AddVectorOfLongs(builder, vectorOfLongs):
- return MonsterAddVectorOfLongs(builder, vectorOfLongs)
+def AddVectorOfLongs(builder: flatbuffers.Builder, vectorOfLongs: int):
+ MonsterAddVectorOfLongs(builder, vectorOfLongs)
def MonsterStartVectorOfLongsVector(builder, numElems):
return builder.StartVector(8, numElems, 8)
-def StartVectorOfLongsVector(builder, numElems):
+def StartVectorOfLongsVector(builder, numElems: int) -> int:
return MonsterStartVectorOfLongsVector(builder, numElems)
def MonsterAddVectorOfDoubles(builder, vectorOfDoubles):
- return builder.PrependUOffsetTRelativeSlot(33, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfDoubles), 0)
+ builder.PrependUOffsetTRelativeSlot(33, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfDoubles), 0)
-def AddVectorOfDoubles(builder, vectorOfDoubles):
- return MonsterAddVectorOfDoubles(builder, vectorOfDoubles)
+def AddVectorOfDoubles(builder: flatbuffers.Builder, vectorOfDoubles: int):
+ MonsterAddVectorOfDoubles(builder, vectorOfDoubles)
def MonsterStartVectorOfDoublesVector(builder, numElems):
return builder.StartVector(8, numElems, 8)
-def StartVectorOfDoublesVector(builder, numElems):
+def StartVectorOfDoublesVector(builder, numElems: int) -> int:
return MonsterStartVectorOfDoublesVector(builder, numElems)
def MonsterAddParentNamespaceTest(builder, parentNamespaceTest):
- return builder.PrependUOffsetTRelativeSlot(34, flatbuffers.number_types.UOffsetTFlags.py_type(parentNamespaceTest), 0)
+ builder.PrependUOffsetTRelativeSlot(34, flatbuffers.number_types.UOffsetTFlags.py_type(parentNamespaceTest), 0)
-def AddParentNamespaceTest(builder, parentNamespaceTest):
- return MonsterAddParentNamespaceTest(builder, parentNamespaceTest)
+def AddParentNamespaceTest(builder: flatbuffers.Builder, parentNamespaceTest: int):
+ MonsterAddParentNamespaceTest(builder, parentNamespaceTest)
def MonsterAddVectorOfReferrables(builder, vectorOfReferrables):
- return builder.PrependUOffsetTRelativeSlot(35, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfReferrables), 0)
+ builder.PrependUOffsetTRelativeSlot(35, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfReferrables), 0)
-def AddVectorOfReferrables(builder, vectorOfReferrables):
- return MonsterAddVectorOfReferrables(builder, vectorOfReferrables)
+def AddVectorOfReferrables(builder: flatbuffers.Builder, vectorOfReferrables: int):
+ MonsterAddVectorOfReferrables(builder, vectorOfReferrables)
def MonsterStartVectorOfReferrablesVector(builder, numElems):
return builder.StartVector(4, numElems, 4)
-def StartVectorOfReferrablesVector(builder, numElems):
+def StartVectorOfReferrablesVector(builder, numElems: int) -> int:
return MonsterStartVectorOfReferrablesVector(builder, numElems)
def MonsterAddSingleWeakReference(builder, singleWeakReference):
- return builder.PrependUint64Slot(36, singleWeakReference, 0)
+ builder.PrependUint64Slot(36, singleWeakReference, 0)
-def AddSingleWeakReference(builder, singleWeakReference):
- return MonsterAddSingleWeakReference(builder, singleWeakReference)
+def AddSingleWeakReference(builder: flatbuffers.Builder, singleWeakReference: int):
+ MonsterAddSingleWeakReference(builder, singleWeakReference)
def MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferences):
- return builder.PrependUOffsetTRelativeSlot(37, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfWeakReferences), 0)
+ builder.PrependUOffsetTRelativeSlot(37, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfWeakReferences), 0)
-def AddVectorOfWeakReferences(builder, vectorOfWeakReferences):
- return MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferences)
+def AddVectorOfWeakReferences(builder: flatbuffers.Builder, vectorOfWeakReferences: int):
+ MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferences)
def MonsterStartVectorOfWeakReferencesVector(builder, numElems):
return builder.StartVector(8, numElems, 8)
-def StartVectorOfWeakReferencesVector(builder, numElems):
+def StartVectorOfWeakReferencesVector(builder, numElems: int) -> int:
return MonsterStartVectorOfWeakReferencesVector(builder, numElems)
def MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrables):
- return builder.PrependUOffsetTRelativeSlot(38, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfStrongReferrables), 0)
+ builder.PrependUOffsetTRelativeSlot(38, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfStrongReferrables), 0)
-def AddVectorOfStrongReferrables(builder, vectorOfStrongReferrables):
- return MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrables)
+def AddVectorOfStrongReferrables(builder: flatbuffers.Builder, vectorOfStrongReferrables: int):
+ MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrables)
def MonsterStartVectorOfStrongReferrablesVector(builder, numElems):
return builder.StartVector(4, numElems, 4)
-def StartVectorOfStrongReferrablesVector(builder, numElems):
+def StartVectorOfStrongReferrablesVector(builder, numElems: int) -> int:
return MonsterStartVectorOfStrongReferrablesVector(builder, numElems)
def MonsterAddCoOwningReference(builder, coOwningReference):
- return builder.PrependUint64Slot(39, coOwningReference, 0)
+ builder.PrependUint64Slot(39, coOwningReference, 0)
-def AddCoOwningReference(builder, coOwningReference):
- return MonsterAddCoOwningReference(builder, coOwningReference)
+def AddCoOwningReference(builder: flatbuffers.Builder, coOwningReference: int):
+ MonsterAddCoOwningReference(builder, coOwningReference)
def MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences):
- return builder.PrependUOffsetTRelativeSlot(40, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfCoOwningReferences), 0)
+ builder.PrependUOffsetTRelativeSlot(40, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfCoOwningReferences), 0)
-def AddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences):
- return MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences)
+def AddVectorOfCoOwningReferences(builder: flatbuffers.Builder, vectorOfCoOwningReferences: int):
+ MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences)
def MonsterStartVectorOfCoOwningReferencesVector(builder, numElems):
return builder.StartVector(8, numElems, 8)
-def StartVectorOfCoOwningReferencesVector(builder, numElems):
+def StartVectorOfCoOwningReferencesVector(builder, numElems: int) -> int:
return MonsterStartVectorOfCoOwningReferencesVector(builder, numElems)
def MonsterAddNonOwningReference(builder, nonOwningReference):
- return builder.PrependUint64Slot(41, nonOwningReference, 0)
+ builder.PrependUint64Slot(41, nonOwningReference, 0)
-def AddNonOwningReference(builder, nonOwningReference):
- return MonsterAddNonOwningReference(builder, nonOwningReference)
+def AddNonOwningReference(builder: flatbuffers.Builder, nonOwningReference: int):
+ MonsterAddNonOwningReference(builder, nonOwningReference)
def MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences):
- return builder.PrependUOffsetTRelativeSlot(42, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfNonOwningReferences), 0)
+ builder.PrependUOffsetTRelativeSlot(42, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfNonOwningReferences), 0)
-def AddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences):
- return MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences)
+def AddVectorOfNonOwningReferences(builder: flatbuffers.Builder, vectorOfNonOwningReferences: int):
+ MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences)
def MonsterStartVectorOfNonOwningReferencesVector(builder, numElems):
return builder.StartVector(8, numElems, 8)
-def StartVectorOfNonOwningReferencesVector(builder, numElems):
+def StartVectorOfNonOwningReferencesVector(builder, numElems: int) -> int:
return MonsterStartVectorOfNonOwningReferencesVector(builder, numElems)
def MonsterAddAnyUniqueType(builder, anyUniqueType):
- return builder.PrependUint8Slot(43, anyUniqueType, 0)
+ builder.PrependUint8Slot(43, anyUniqueType, 0)
-def AddAnyUniqueType(builder, anyUniqueType):
- return MonsterAddAnyUniqueType(builder, anyUniqueType)
+def AddAnyUniqueType(builder: flatbuffers.Builder, anyUniqueType: int):
+ MonsterAddAnyUniqueType(builder, anyUniqueType)
def MonsterAddAnyUnique(builder, anyUnique):
- return builder.PrependUOffsetTRelativeSlot(44, flatbuffers.number_types.UOffsetTFlags.py_type(anyUnique), 0)
+ builder.PrependUOffsetTRelativeSlot(44, flatbuffers.number_types.UOffsetTFlags.py_type(anyUnique), 0)
-def AddAnyUnique(builder, anyUnique):
- return MonsterAddAnyUnique(builder, anyUnique)
+def AddAnyUnique(builder: flatbuffers.Builder, anyUnique: int):
+ MonsterAddAnyUnique(builder, anyUnique)
def MonsterAddAnyAmbiguousType(builder, anyAmbiguousType):
- return builder.PrependUint8Slot(45, anyAmbiguousType, 0)
+ builder.PrependUint8Slot(45, anyAmbiguousType, 0)
-def AddAnyAmbiguousType(builder, anyAmbiguousType):
- return MonsterAddAnyAmbiguousType(builder, anyAmbiguousType)
+def AddAnyAmbiguousType(builder: flatbuffers.Builder, anyAmbiguousType: int):
+ MonsterAddAnyAmbiguousType(builder, anyAmbiguousType)
def MonsterAddAnyAmbiguous(builder, anyAmbiguous):
- return builder.PrependUOffsetTRelativeSlot(46, flatbuffers.number_types.UOffsetTFlags.py_type(anyAmbiguous), 0)
+ builder.PrependUOffsetTRelativeSlot(46, flatbuffers.number_types.UOffsetTFlags.py_type(anyAmbiguous), 0)
-def AddAnyAmbiguous(builder, anyAmbiguous):
- return MonsterAddAnyAmbiguous(builder, anyAmbiguous)
+def AddAnyAmbiguous(builder: flatbuffers.Builder, anyAmbiguous: int):
+ MonsterAddAnyAmbiguous(builder, anyAmbiguous)
def MonsterAddVectorOfEnums(builder, vectorOfEnums):
- return builder.PrependUOffsetTRelativeSlot(47, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfEnums), 0)
+ builder.PrependUOffsetTRelativeSlot(47, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfEnums), 0)
-def AddVectorOfEnums(builder, vectorOfEnums):
- return MonsterAddVectorOfEnums(builder, vectorOfEnums)
+def AddVectorOfEnums(builder: flatbuffers.Builder, vectorOfEnums: int):
+ MonsterAddVectorOfEnums(builder, vectorOfEnums)
def MonsterStartVectorOfEnumsVector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartVectorOfEnumsVector(builder, numElems):
+def StartVectorOfEnumsVector(builder, numElems: int) -> int:
return MonsterStartVectorOfEnumsVector(builder, numElems)
def MonsterAddSignedEnum(builder, signedEnum):
- return builder.PrependInt8Slot(48, signedEnum, -1)
+ builder.PrependInt8Slot(48, signedEnum, -1)
-def AddSignedEnum(builder, signedEnum):
- return MonsterAddSignedEnum(builder, signedEnum)
+def AddSignedEnum(builder: flatbuffers.Builder, signedEnum: int):
+ MonsterAddSignedEnum(builder, signedEnum)
def MonsterAddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer):
- return builder.PrependUOffsetTRelativeSlot(49, flatbuffers.number_types.UOffsetTFlags.py_type(testrequirednestedflatbuffer), 0)
+ builder.PrependUOffsetTRelativeSlot(49, flatbuffers.number_types.UOffsetTFlags.py_type(testrequirednestedflatbuffer), 0)
-def AddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer):
- return MonsterAddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer)
+def AddTestrequirednestedflatbuffer(builder: flatbuffers.Builder, testrequirednestedflatbuffer: int):
+ MonsterAddTestrequirednestedflatbuffer(builder, testrequirednestedflatbuffer)
def MonsterStartTestrequirednestedflatbufferVector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartTestrequirednestedflatbufferVector(builder, numElems):
+def StartTestrequirednestedflatbufferVector(builder, numElems: int) -> int:
return MonsterStartTestrequirednestedflatbufferVector(builder, numElems)
def MonsterMakeTestrequirednestedflatbufferVectorFromBytes(builder, bytes):
@@ -1301,82 +1301,82 @@ def MonsterMakeTestrequirednestedflatbufferVectorFromBytes(builder, bytes):
def MakeTestrequirednestedflatbufferVectorFromBytes(builder, bytes):
return MonsterMakeTestrequirednestedflatbufferVectorFromBytes(builder, bytes)
def MonsterAddScalarKeySortedTables(builder, scalarKeySortedTables):
- return builder.PrependUOffsetTRelativeSlot(50, flatbuffers.number_types.UOffsetTFlags.py_type(scalarKeySortedTables), 0)
+ builder.PrependUOffsetTRelativeSlot(50, flatbuffers.number_types.UOffsetTFlags.py_type(scalarKeySortedTables), 0)
-def AddScalarKeySortedTables(builder, scalarKeySortedTables):
- return MonsterAddScalarKeySortedTables(builder, scalarKeySortedTables)
+def AddScalarKeySortedTables(builder: flatbuffers.Builder, scalarKeySortedTables: int):
+ MonsterAddScalarKeySortedTables(builder, scalarKeySortedTables)
def MonsterStartScalarKeySortedTablesVector(builder, numElems):
return builder.StartVector(4, numElems, 4)
-def StartScalarKeySortedTablesVector(builder, numElems):
+def StartScalarKeySortedTablesVector(builder, numElems: int) -> int:
return MonsterStartScalarKeySortedTablesVector(builder, numElems)
def MonsterAddNativeInline(builder, nativeInline):
- return builder.PrependStructSlot(51, flatbuffers.number_types.UOffsetTFlags.py_type(nativeInline), 0)
+ builder.PrependStructSlot(51, flatbuffers.number_types.UOffsetTFlags.py_type(nativeInline), 0)
-def AddNativeInline(builder, nativeInline):
- return MonsterAddNativeInline(builder, nativeInline)
+def AddNativeInline(builder: flatbuffers.Builder, nativeInline: Any):
+ MonsterAddNativeInline(builder, nativeInline)
def MonsterAddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault):
- return builder.PrependUint64Slot(52, longEnumNonEnumDefault, 0)
+ builder.PrependUint64Slot(52, longEnumNonEnumDefault, 0)
-def AddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault):
- return MonsterAddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault)
+def AddLongEnumNonEnumDefault(builder: flatbuffers.Builder, longEnumNonEnumDefault: int):
+ MonsterAddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault)
def MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault):
- return builder.PrependUint64Slot(53, longEnumNormalDefault, 2)
+ builder.PrependUint64Slot(53, longEnumNormalDefault, 2)
-def AddLongEnumNormalDefault(builder, longEnumNormalDefault):
- return MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault)
+def AddLongEnumNormalDefault(builder: flatbuffers.Builder, longEnumNormalDefault: int):
+ MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault)
def MonsterAddNanDefault(builder, nanDefault):
- return builder.PrependFloat32Slot(54, nanDefault, float('nan'))
+ builder.PrependFloat32Slot(54, nanDefault, float('nan'))
-def AddNanDefault(builder, nanDefault):
- return MonsterAddNanDefault(builder, nanDefault)
+def AddNanDefault(builder: flatbuffers.Builder, nanDefault: float):
+ MonsterAddNanDefault(builder, nanDefault)
def MonsterAddInfDefault(builder, infDefault):
- return builder.PrependFloat32Slot(55, infDefault, float('inf'))
+ builder.PrependFloat32Slot(55, infDefault, float('inf'))
-def AddInfDefault(builder, infDefault):
- return MonsterAddInfDefault(builder, infDefault)
+def AddInfDefault(builder: flatbuffers.Builder, infDefault: float):
+ MonsterAddInfDefault(builder, infDefault)
def MonsterAddPositiveInfDefault(builder, positiveInfDefault):
- return builder.PrependFloat32Slot(56, positiveInfDefault, float('inf'))
+ builder.PrependFloat32Slot(56, positiveInfDefault, float('inf'))
-def AddPositiveInfDefault(builder, positiveInfDefault):
- return MonsterAddPositiveInfDefault(builder, positiveInfDefault)
+def AddPositiveInfDefault(builder: flatbuffers.Builder, positiveInfDefault: float):
+ MonsterAddPositiveInfDefault(builder, positiveInfDefault)
def MonsterAddInfinityDefault(builder, infinityDefault):
- return builder.PrependFloat32Slot(57, infinityDefault, float('inf'))
+ builder.PrependFloat32Slot(57, infinityDefault, float('inf'))
-def AddInfinityDefault(builder, infinityDefault):
- return MonsterAddInfinityDefault(builder, infinityDefault)
+def AddInfinityDefault(builder: flatbuffers.Builder, infinityDefault: float):
+ MonsterAddInfinityDefault(builder, infinityDefault)
def MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault):
- return builder.PrependFloat32Slot(58, positiveInfinityDefault, float('inf'))
+ builder.PrependFloat32Slot(58, positiveInfinityDefault, float('inf'))
-def AddPositiveInfinityDefault(builder, positiveInfinityDefault):
- return MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault)
+def AddPositiveInfinityDefault(builder: flatbuffers.Builder, positiveInfinityDefault: float):
+ MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault)
def MonsterAddNegativeInfDefault(builder, negativeInfDefault):
- return builder.PrependFloat32Slot(59, negativeInfDefault, float('-inf'))
+ builder.PrependFloat32Slot(59, negativeInfDefault, float('-inf'))
-def AddNegativeInfDefault(builder, negativeInfDefault):
- return MonsterAddNegativeInfDefault(builder, negativeInfDefault)
+def AddNegativeInfDefault(builder: flatbuffers.Builder, negativeInfDefault: float):
+ MonsterAddNegativeInfDefault(builder, negativeInfDefault)
def MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault):
- return builder.PrependFloat32Slot(60, negativeInfinityDefault, float('-inf'))
+ builder.PrependFloat32Slot(60, negativeInfinityDefault, float('-inf'))
-def AddNegativeInfinityDefault(builder, negativeInfinityDefault):
- return MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault)
+def AddNegativeInfinityDefault(builder: flatbuffers.Builder, negativeInfinityDefault: float):
+ MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault)
def MonsterAddDoubleInfDefault(builder, doubleInfDefault):
- return builder.PrependFloat64Slot(61, doubleInfDefault, float('inf'))
+ builder.PrependFloat64Slot(61, doubleInfDefault, float('inf'))
-def AddDoubleInfDefault(builder, doubleInfDefault):
- return MonsterAddDoubleInfDefault(builder, doubleInfDefault)
+def AddDoubleInfDefault(builder: flatbuffers.Builder, doubleInfDefault: float):
+ MonsterAddDoubleInfDefault(builder, doubleInfDefault)
def MonsterEnd(builder):
return builder.EndObject()
diff --git a/tests/MyGame/Example/NestedStruct.py b/tests/MyGame/Example/NestedStruct.py
index 7f8d18ef..d5d672a2 100644
--- a/tests/MyGame/Example/NestedStruct.py
+++ b/tests/MyGame/Example/NestedStruct.py
@@ -4,17 +4,18 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
np = import_numpy()
class NestedStruct(object):
__slots__ = ['_tab']
@classmethod
- def SizeOf(cls):
+ def SizeOf(cls) -> int:
return 32
# NestedStruct
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# NestedStruct
@@ -31,11 +32,11 @@ class NestedStruct(object):
return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int32Flags, self._tab.Pos + 0, self.ALength())
# NestedStruct
- def ALength(self):
+ def ALength(self) -> int:
return 2
# NestedStruct
- def AIsNone(self):
+ def AIsNone(self) -> bool:
return False
# NestedStruct
@@ -54,11 +55,11 @@ class NestedStruct(object):
return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int8Flags, self._tab.Pos + 9, self.CLength())
# NestedStruct
- def CLength(self):
+ def CLength(self) -> int:
return 2
# NestedStruct
- def CIsNone(self):
+ def CIsNone(self) -> bool:
return False
# NestedStruct
@@ -75,11 +76,11 @@ class NestedStruct(object):
return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int64Flags, self._tab.Pos + 16, self.DLength())
# NestedStruct
- def DLength(self):
+ def DLength(self) -> int:
return 2
# NestedStruct
- def DIsNone(self):
+ def DIsNone(self) -> bool:
return False
diff --git a/tests/MyGame/Example/NestedUnion/NestedUnionTest.py b/tests/MyGame/Example/NestedUnion/NestedUnionTest.py
index 33c2a441..7540b6e8 100644
--- a/tests/MyGame/Example/NestedUnion/NestedUnionTest.py
+++ b/tests/MyGame/Example/NestedUnion/NestedUnionTest.py
@@ -4,13 +4,16 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
+from flatbuffers.table import Table
+from typing import Optional
np = import_numpy()
class NestedUnionTest(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAs(cls, buf, offset=0):
+ def GetRootAs(cls, buf, offset: int = 0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = NestedUnionTest()
x.Init(buf, n + offset)
@@ -21,11 +24,11 @@ class NestedUnionTest(object):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# NestedUnionTest
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# NestedUnionTest
- def Name(self):
+ def Name(self) -> Optional[str]:
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.String(o + self._tab.Pos)
@@ -39,10 +42,9 @@ class NestedUnionTest(object):
return 0
# NestedUnionTest
- def Data(self):
+ def Data(self) -> Optional[flatbuffers.table.Table]:
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
- from flatbuffers.table import Table
obj = Table(bytearray(), 0)
self._tab.Union(obj, o)
return obj
@@ -55,40 +57,40 @@ class NestedUnionTest(object):
return self._tab.Get(flatbuffers.number_types.Int16Flags, o + self._tab.Pos)
return 0
-def NestedUnionTestStart(builder):
- return builder.StartObject(4)
+def NestedUnionTestStart(builder: flatbuffers.Builder):
+ builder.StartObject(4)
-def Start(builder):
- return NestedUnionTestStart(builder)
+def Start(builder: flatbuffers.Builder):
+ NestedUnionTestStart(builder)
-def NestedUnionTestAddName(builder, name):
- return builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
+def NestedUnionTestAddName(builder: flatbuffers.Builder, name: int):
+ builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
-def AddName(builder, name):
- return NestedUnionTestAddName(builder, name)
+def AddName(builder: flatbuffers.Builder, name: int):
+ NestedUnionTestAddName(builder, name)
-def NestedUnionTestAddDataType(builder, dataType):
- return builder.PrependUint8Slot(1, dataType, 0)
+def NestedUnionTestAddDataType(builder: flatbuffers.Builder, dataType: int):
+ builder.PrependUint8Slot(1, dataType, 0)
-def AddDataType(builder, dataType):
- return NestedUnionTestAddDataType(builder, dataType)
+def AddDataType(builder: flatbuffers.Builder, dataType: int):
+ NestedUnionTestAddDataType(builder, dataType)
-def NestedUnionTestAddData(builder, data):
- return builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
+def NestedUnionTestAddData(builder: flatbuffers.Builder, data: int):
+ builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
-def AddData(builder, data):
- return NestedUnionTestAddData(builder, data)
+def AddData(builder: flatbuffers.Builder, data: int):
+ NestedUnionTestAddData(builder, data)
-def NestedUnionTestAddId(builder, id):
- return builder.PrependInt16Slot(3, id, 0)
+def NestedUnionTestAddId(builder: flatbuffers.Builder, id: int):
+ builder.PrependInt16Slot(3, id, 0)
-def AddId(builder, id):
- return NestedUnionTestAddId(builder, id)
+def AddId(builder: flatbuffers.Builder, id: int):
+ NestedUnionTestAddId(builder, id)
-def NestedUnionTestEnd(builder):
+def NestedUnionTestEnd(builder: flatbuffers.Builder) -> int:
return builder.EndObject()
-def End(builder):
+def End(builder: flatbuffers.Builder) -> int:
return NestedUnionTestEnd(builder)
import MyGame.Example.NestedUnion.Any
diff --git a/tests/MyGame/Example/NestedUnion/Test.py b/tests/MyGame/Example/NestedUnion/Test.py
index 143d1dfd..e4e90be2 100644
--- a/tests/MyGame/Example/NestedUnion/Test.py
+++ b/tests/MyGame/Example/NestedUnion/Test.py
@@ -4,17 +4,18 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
np = import_numpy()
class Test(object):
__slots__ = ['_tab']
@classmethod
- def SizeOf(cls):
+ def SizeOf(cls) -> int:
return 4
# Test
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# Test
diff --git a/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py b/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py
index b3ad74f7..9b7ef28c 100644
--- a/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py
+++ b/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py
@@ -4,13 +4,14 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
np = import_numpy()
class TestSimpleTableWithEnum(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAs(cls, buf, offset=0):
+ def GetRootAs(cls, buf, offset: int = 0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TestSimpleTableWithEnum()
x.Init(buf, n + offset)
@@ -21,7 +22,7 @@ class TestSimpleTableWithEnum(object):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# TestSimpleTableWithEnum
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# TestSimpleTableWithEnum
@@ -31,22 +32,22 @@ class TestSimpleTableWithEnum(object):
return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
return 2
-def TestSimpleTableWithEnumStart(builder):
- return builder.StartObject(1)
+def TestSimpleTableWithEnumStart(builder: flatbuffers.Builder):
+ builder.StartObject(1)
-def Start(builder):
- return TestSimpleTableWithEnumStart(builder)
+def Start(builder: flatbuffers.Builder):
+ TestSimpleTableWithEnumStart(builder)
-def TestSimpleTableWithEnumAddColor(builder, color):
- return builder.PrependUint8Slot(0, color, 2)
+def TestSimpleTableWithEnumAddColor(builder: flatbuffers.Builder, color: int):
+ builder.PrependUint8Slot(0, color, 2)
-def AddColor(builder, color):
- return TestSimpleTableWithEnumAddColor(builder, color)
+def AddColor(builder: flatbuffers.Builder, color: int):
+ TestSimpleTableWithEnumAddColor(builder, color)
-def TestSimpleTableWithEnumEnd(builder):
+def TestSimpleTableWithEnumEnd(builder: flatbuffers.Builder) -> int:
return builder.EndObject()
-def End(builder):
+def End(builder: flatbuffers.Builder) -> int:
return TestSimpleTableWithEnumEnd(builder)
diff --git a/tests/MyGame/Example/NestedUnion/Vec3.py b/tests/MyGame/Example/NestedUnion/Vec3.py
index 915f5801..11feab11 100644
--- a/tests/MyGame/Example/NestedUnion/Vec3.py
+++ b/tests/MyGame/Example/NestedUnion/Vec3.py
@@ -4,13 +4,16 @@
import flatbuffers
from flatbuffers.compat import import_numpy
+from typing import Any
+from .MyGame.Example.NestedUnion.Test import Test
+from typing import Optional
np = import_numpy()
class Vec3(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAs(cls, buf, offset=0):
+ def GetRootAs(cls, buf, offset: int = 0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Vec3()
x.Init(buf, n + offset)
@@ -21,7 +24,7 @@ class Vec3(object):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# Vec3
- def Init(self, buf, pos):
+ def Init(self, buf: bytes, pos: int):
self._tab = flatbuffers.table.Table(buf, pos)
# Vec3
@@ -60,62 +63,61 @@ class Vec3(object):
return 0
# Vec3
- def Test3(self):
+ def Test3(self) -> Optional[Test]:
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
x = o + self._tab.Pos
- from MyGame.Example.NestedUnion.Test import Test
obj = Test()
obj.Init(self._tab.Bytes, x)
return obj
return None
-def Vec3Start(builder):
- return builder.StartObject(6)
+def Vec3Start(builder: flatbuffers.Builder):
+ builder.StartObject(6)
-def Start(builder):
- return Vec3Start(builder)
+def Start(builder: flatbuffers.Builder):
+ Vec3Start(builder)
-def Vec3AddX(builder, x):
- return builder.PrependFloat64Slot(0, x, 0.0)
+def Vec3AddX(builder: flatbuffers.Builder, x: float):
+ builder.PrependFloat64Slot(0, x, 0.0)
-def AddX(builder, x):
- return Vec3AddX(builder, x)
+def AddX(builder: flatbuffers.Builder, x: float):
+ Vec3AddX(builder, x)
-def Vec3AddY(builder, y):
- return builder.PrependFloat64Slot(1, y, 0.0)
+def Vec3AddY(builder: flatbuffers.Builder, y: float):
+ builder.PrependFloat64Slot(1, y, 0.0)
-def AddY(builder, y):
- return Vec3AddY(builder, y)
+def AddY(builder: flatbuffers.Builder, y: float):
+ Vec3AddY(builder, y)
-def Vec3AddZ(builder, z):
- return builder.PrependFloat64Slot(2, z, 0.0)
+def Vec3AddZ(builder: flatbuffers.Builder, z: float):
+ builder.PrependFloat64Slot(2, z, 0.0)
-def AddZ(builder, z):
- return Vec3AddZ(builder, z)
+def AddZ(builder: flatbuffers.Builder, z: float):
+ Vec3AddZ(builder, z)
-def Vec3AddTest1(builder, test1):
- return builder.PrependFloat64Slot(3, test1, 0.0)
+def Vec3AddTest1(builder: flatbuffers.Builder, test1: float):
+ builder.PrependFloat64Slot(3, test1, 0.0)
-def AddTest1(builder, test1):
- return Vec3AddTest1(builder, test1)
+def AddTest1(builder: flatbuffers.Builder, test1: float):
+ Vec3AddTest1(builder, test1)
-def Vec3AddTest2(builder, test2):
- return builder.PrependUint8Slot(4, test2, 0)
+def Vec3AddTest2(builder: flatbuffers.Builder, test2: int):
+ builder.PrependUint8Slot(4, test2, 0)
-def AddTest2(builder, test2):
- return Vec3AddTest2(builder, test2)
+def AddTest2(builder: flatbuffers.Builder, test2: int):
+ Vec3AddTest2(builder, test2)
-def Vec3AddTest3(builder, test3):
- return builder.PrependStructSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(test3), 0)
+def Vec3AddTest3(builder: flatbuffers.Builder, test3: Any):
+ builder.PrependStructSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(test3), 0)
-def AddTest3(builder, test3):
- return Vec3AddTest3(builder, test3)
+def AddTest3(builder: flatbuffers.Builder, test3: Any):
+ Vec3AddTest3(builder, test3)
-def Vec3End(builder):
+def Vec3End(builder: flatbuffers.Builder) -> int:
return builder.EndObject()
-def End(builder):
+def End(builder: flatbuffers.Builder) -> int:
return Vec3End(builder)
import MyGame.Example.NestedUnion.Test
diff --git a/tests/MyGame/Example/Referrable.py b/tests/MyGame/Example/Referrable.py
index e5081e1a..203c9341 100644
--- a/tests/MyGame/Example/Referrable.py
+++ b/tests/MyGame/Example/Referrable.py
@@ -36,16 +36,16 @@ class Referrable(object):
return 0
def ReferrableStart(builder):
- return builder.StartObject(1)
+ builder.StartObject(1)
def Start(builder):
- return ReferrableStart(builder)
+ ReferrableStart(builder)
def ReferrableAddId(builder, id):
- return builder.PrependUint64Slot(0, id, 0)
+ builder.PrependUint64Slot(0, id, 0)
-def AddId(builder, id):
- return ReferrableAddId(builder, id)
+def AddId(builder: flatbuffers.Builder, id: int):
+ ReferrableAddId(builder, id)
def ReferrableEnd(builder):
return builder.EndObject()
diff --git a/tests/MyGame/Example/Stat.py b/tests/MyGame/Example/Stat.py
index 00ca1a46..4f175574 100644
--- a/tests/MyGame/Example/Stat.py
+++ b/tests/MyGame/Example/Stat.py
@@ -50,28 +50,28 @@ class Stat(object):
return 0
def StatStart(builder):
- return builder.StartObject(3)
+ builder.StartObject(3)
def Start(builder):
- return StatStart(builder)
+ StatStart(builder)
def StatAddId(builder, id):
- return builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0)
+ builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0)
-def AddId(builder, id):
- return StatAddId(builder, id)
+def AddId(builder: flatbuffers.Builder, id: int):
+ StatAddId(builder, id)
def StatAddVal(builder, val):
- return builder.PrependInt64Slot(1, val, 0)
+ builder.PrependInt64Slot(1, val, 0)
-def AddVal(builder, val):
- return StatAddVal(builder, val)
+def AddVal(builder: flatbuffers.Builder, val: int):
+ StatAddVal(builder, val)
def StatAddCount(builder, count):
- return builder.PrependUint16Slot(2, count, 0)
+ builder.PrependUint16Slot(2, count, 0)
-def AddCount(builder, count):
- return StatAddCount(builder, count)
+def AddCount(builder: flatbuffers.Builder, count: int):
+ StatAddCount(builder, count)
def StatEnd(builder):
return builder.EndObject()
diff --git a/tests/MyGame/Example/TestSimpleTableWithEnum.py b/tests/MyGame/Example/TestSimpleTableWithEnum.py
index 99e5c41b..856442c8 100644
--- a/tests/MyGame/Example/TestSimpleTableWithEnum.py
+++ b/tests/MyGame/Example/TestSimpleTableWithEnum.py
@@ -36,16 +36,16 @@ class TestSimpleTableWithEnum(object):
return 2
def TestSimpleTableWithEnumStart(builder):
- return builder.StartObject(1)
+ builder.StartObject(1)
def Start(builder):
- return TestSimpleTableWithEnumStart(builder)
+ TestSimpleTableWithEnumStart(builder)
def TestSimpleTableWithEnumAddColor(builder, color):
- return builder.PrependUint8Slot(0, color, 2)
+ builder.PrependUint8Slot(0, color, 2)
-def AddColor(builder, color):
- return TestSimpleTableWithEnumAddColor(builder, color)
+def AddColor(builder: flatbuffers.Builder, color: int):
+ TestSimpleTableWithEnumAddColor(builder, color)
def TestSimpleTableWithEnumEnd(builder):
return builder.EndObject()
diff --git a/tests/MyGame/Example/TypeAliases.py b/tests/MyGame/Example/TypeAliases.py
index 8fb33b9d..27c6c4f9 100644
--- a/tests/MyGame/Example/TypeAliases.py
+++ b/tests/MyGame/Example/TypeAliases.py
@@ -153,93 +153,93 @@ class TypeAliases(object):
return o == 0
def TypeAliasesStart(builder):
- return builder.StartObject(12)
+ builder.StartObject(12)
def Start(builder):
- return TypeAliasesStart(builder)
+ TypeAliasesStart(builder)
def TypeAliasesAddI8(builder, i8):
- return builder.PrependInt8Slot(0, i8, 0)
+ builder.PrependInt8Slot(0, i8, 0)
-def AddI8(builder, i8):
- return TypeAliasesAddI8(builder, i8)
+def AddI8(builder: flatbuffers.Builder, i8: int):
+ TypeAliasesAddI8(builder, i8)
def TypeAliasesAddU8(builder, u8):
- return builder.PrependUint8Slot(1, u8, 0)
+ builder.PrependUint8Slot(1, u8, 0)
-def AddU8(builder, u8):
- return TypeAliasesAddU8(builder, u8)
+def AddU8(builder: flatbuffers.Builder, u8: int):
+ TypeAliasesAddU8(builder, u8)
def TypeAliasesAddI16(builder, i16):
- return builder.PrependInt16Slot(2, i16, 0)
+ builder.PrependInt16Slot(2, i16, 0)
-def AddI16(builder, i16):
- return TypeAliasesAddI16(builder, i16)
+def AddI16(builder: flatbuffers.Builder, i16: int):
+ TypeAliasesAddI16(builder, i16)
def TypeAliasesAddU16(builder, u16):
- return builder.PrependUint16Slot(3, u16, 0)
+ builder.PrependUint16Slot(3, u16, 0)
-def AddU16(builder, u16):
- return TypeAliasesAddU16(builder, u16)
+def AddU16(builder: flatbuffers.Builder, u16: int):
+ TypeAliasesAddU16(builder, u16)
def TypeAliasesAddI32(builder, i32):
- return builder.PrependInt32Slot(4, i32, 0)
+ builder.PrependInt32Slot(4, i32, 0)
-def AddI32(builder, i32):
- return TypeAliasesAddI32(builder, i32)
+def AddI32(builder: flatbuffers.Builder, i32: int):
+ TypeAliasesAddI32(builder, i32)
def TypeAliasesAddU32(builder, u32):
- return builder.PrependUint32Slot(5, u32, 0)
+ builder.PrependUint32Slot(5, u32, 0)
-def AddU32(builder, u32):
- return TypeAliasesAddU32(builder, u32)
+def AddU32(builder: flatbuffers.Builder, u32: int):
+ TypeAliasesAddU32(builder, u32)
def TypeAliasesAddI64(builder, i64):
- return builder.PrependInt64Slot(6, i64, 0)
+ builder.PrependInt64Slot(6, i64, 0)
-def AddI64(builder, i64):
- return TypeAliasesAddI64(builder, i64)
+def AddI64(builder: flatbuffers.Builder, i64: int):
+ TypeAliasesAddI64(builder, i64)
def TypeAliasesAddU64(builder, u64):
- return builder.PrependUint64Slot(7, u64, 0)
+ builder.PrependUint64Slot(7, u64, 0)
-def AddU64(builder, u64):
- return TypeAliasesAddU64(builder, u64)
+def AddU64(builder: flatbuffers.Builder, u64: int):
+ TypeAliasesAddU64(builder, u64)
def TypeAliasesAddF32(builder, f32):
- return builder.PrependFloat32Slot(8, f32, 0.0)
+ builder.PrependFloat32Slot(8, f32, 0.0)
-def AddF32(builder, f32):
- return TypeAliasesAddF32(builder, f32)
+def AddF32(builder: flatbuffers.Builder, f32: float):
+ TypeAliasesAddF32(builder, f32)
def TypeAliasesAddF64(builder, f64):
- return builder.PrependFloat64Slot(9, f64, 0.0)
+ builder.PrependFloat64Slot(9, f64, 0.0)
-def AddF64(builder, f64):
- return TypeAliasesAddF64(builder, f64)
+def AddF64(builder: flatbuffers.Builder, f64: float):
+ TypeAliasesAddF64(builder, f64)
def TypeAliasesAddV8(builder, v8):
- return builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(v8), 0)
+ builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(v8), 0)
-def AddV8(builder, v8):
- return TypeAliasesAddV8(builder, v8)
+def AddV8(builder: flatbuffers.Builder, v8: int):
+ TypeAliasesAddV8(builder, v8)
def TypeAliasesStartV8Vector(builder, numElems):
return builder.StartVector(1, numElems, 1)
-def StartV8Vector(builder, numElems):
+def StartV8Vector(builder, numElems: int) -> int:
return TypeAliasesStartV8Vector(builder, numElems)
def TypeAliasesAddVf64(builder, vf64):
- return builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(vf64), 0)
+ builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(vf64), 0)
-def AddVf64(builder, vf64):
- return TypeAliasesAddVf64(builder, vf64)
+def AddVf64(builder: flatbuffers.Builder, vf64: int):
+ TypeAliasesAddVf64(builder, vf64)
def TypeAliasesStartVf64Vector(builder, numElems):
return builder.StartVector(8, numElems, 8)
-def StartVf64Vector(builder, numElems):
+def StartVf64Vector(builder, numElems: int) -> int:
return TypeAliasesStartVf64Vector(builder, numElems)
def TypeAliasesEnd(builder):