diff --git a/core/embed/rust/src/protobuf/obj.rs b/core/embed/rust/src/protobuf/obj.rs index 7b4c69033..fc3a1f3a1 100644 --- a/core/embed/rust/src/protobuf/obj.rs +++ b/core/embed/rust/src/protobuf/obj.rs @@ -356,7 +356,7 @@ pub static mp_module_trezorproto: Module = obj_module! { /// """Calculate length of encoding of the specified message.""" Qstr::MP_QSTR_encoded_length => obj_fn_1!(protobuf_len).as_obj(), - /// def encode(buffer: bytearray, msg: MessageType) -> int: + /// def encode(buffer: bytearray | memoryview, msg: MessageType) -> int: /// """Encode the message into the specified buffer. Return length of /// encoding.""" Qstr::MP_QSTR_encode => obj_fn_2!(protobuf_encode).as_obj() diff --git a/core/mocks/generated/trezorproto.pyi b/core/mocks/generated/trezorproto.pyi index ee7c9eb72..530ef0963 100644 --- a/core/mocks/generated/trezorproto.pyi +++ b/core/mocks/generated/trezorproto.pyi @@ -42,6 +42,6 @@ def encoded_length(msg: MessageType) -> int: # rust/src/protobuf/obj.rs -def encode(buffer: bytearray, msg: MessageType) -> int: +def encode(buffer: bytearray | memoryview, msg: MessageType) -> int: """Encode the message into the specified buffer. Return length of encoding."""