mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
feat(core): Allow Any type in is_type_of().
[no changelog]
This commit is contained in:
parent
2f6a7096da
commit
b5cb9cb035
@ -59,6 +59,6 @@ def member_type(field):
|
|||||||
% endif # if fields
|
% endif # if fields
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def is_type_of(cls, msg: protobuf.MessageType) -> TypeGuard["${message.name}"]:
|
def is_type_of(cls, msg: Any) -> TypeGuard["${message.name}"]:
|
||||||
return isinstance(msg, cls)
|
return isinstance(msg, cls)
|
||||||
% endfor
|
% endfor
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user