From 4038bbd817f1e75cdbabb87fd845b15cce6831d5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 16 May 2025 15:27:59 -0400 Subject: [PATCH] tweak --- script/api_protobuf/api_protobuf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/script/api_protobuf/api_protobuf.py b/script/api_protobuf/api_protobuf.py index 0d4970463a..fceeccd64f 100755 --- a/script/api_protobuf/api_protobuf.py +++ b/script/api_protobuf/api_protobuf.py @@ -789,7 +789,13 @@ PROTOBUF_TYPE_SIZES = { def calculate_fixed_message_size(desc: descriptor.DescriptorProto) -> int: - """Calculate the maximum size of a fixed-size message.""" + """Calculate the maximum size of a fixed-size message. + + Args: + desc: The descriptor of the message to calculate the size for. + Returns: + The maximum size of the message, or -1 if it has variable length + """ total_size: int = 0 for field in desc.field: