Skip to content

Remove Unused Serialization Function #34

@threeal

Description

@threeal

Remove the following serialization functions as it's unused and already replaced by serialization function on Kumo JSON.

kumo/kumo/message.py

Lines 69 to 87 in bbd1145

def msg_to_dict(msg: MsgType) -> dict:
fields = msg.get_fields_and_field_types()
msg_dict = {}
for field in fields:
if hasattr(msg, field):
msg_dict[field] = getattr(msg, field)
return msg_dict
def dict_to_msg(msg_dict: dict, msg: MsgType) -> MsgType:
fields = msg.get_fields_and_field_types()
for field in fields:
if hasattr(msg, field):
setattr(msg, field, msg_dict.get(field))
return msg

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions