aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2024-03-13 14:27:08 -0700
committerDavid Duarte <git@delta.sh>2024-03-15 11:03:55 -0700
commit188b8309598e6f30c48cf10170b48a300a752580 (patch)
treedbe4569529516daf3fc2b3ac5c8fbd17a4f8bc3f
parent11164e2acea4291433f1b0b539b905de9aca7bcb (diff)
downloadbt-test-interfaces-188b8309598e6f30c48cf10170b48a300a752580.tar.gz
Make protoc-gen-custom_grpc deterministic
Sort the contents of a set before iterating over it.
-rwxr-xr-xpython/_build/protoc-gen-custom_grpc2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/_build/protoc-gen-custom_grpc b/python/_build/protoc-gen-custom_grpc
index f03a0c8..287b95b 100755
--- a/python/_build/protoc-gen-custom_grpc
+++ b/python/_build/protoc-gen-custom_grpc
@@ -210,7 +210,7 @@ def generate_message(imports: List[str], file: FileDescriptorProto, message: Des
type = 'Optional[' + types.pop() + ']'
else:
types.add('None')
- type = 'Union[' + ', '.join(types) + ']'
+ type = 'Union[' + ', '.join(sorted(types)) + ']'
nested_message_lines.extend([
f'class {message.name}_{oneof_name}_dict(TypedDict, total=False):',