1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

fix(python): add default value to protobuf.Field

[no changelog]
This commit is contained in:
grdddj 2022-10-26 17:18:48 +02:00 committed by matejcik
parent 6e36f479db
commit fd1fbc9372
2 changed files with 693 additions and 689 deletions

View File

@ -27,7 +27,11 @@ class ${message.name}(protobuf.MessageType):
% if message.fields:
FIELDS = {
% for field in message.fields:
% if not field.required:
${field.number}: protobuf.Field("${field.name}", "${field.type_name}", repeated=${field.repeated}, required=${field.required}, default=${field.default_value_repr}),
% else:
${field.number}: protobuf.Field("${field.name}", "${field.type_name}", repeated=${field.repeated}, required=${field.required}),
% endif
% endfor
}

File diff suppressed because it is too large Load Diff