The stub generator for the Pack function https://github.com/google/flatbuffers/blob/bab10754d93d74d1ff44d46de63558bc4127f7d8/src/idl_gen_python.cpp#L382 says Pack returns None, but it returns an integer since it returns the value from end End function which is an int (aka uoffset).
The stub generator for the Pack function
flatbuffers/src/idl_gen_python.cpp
Line 382 in bab1075