MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / set_raw_value

Method set_raw_value

detrsmpl/data/data_structures/human_data.py:723–744  ·  view source on GitHub ↗

Set the raw value of self[key] to val after key check. It acts the same as dict.__setitem__(self, key, val) if the key satisfied constraints. Args: key (_KT): Key in dict. val (_VT): Value to the key. Raises:

(self, key: _KT, val: _VT)

Source from the content-addressed store, hash-verified

721 dict.__setitem__(self, key, val)
722
723 def set_raw_value(self, key: _KT, val: _VT) -> None:
724 """Set the raw value of self[key] to val after key check. It acts the
725 same as dict.__setitem__(self, key, val) if the key satisfied
726 constraints.
727
728 Args:
729 key (_KT):
730 Key in dict.
731 val (_VT):
732 Value to the key.
733
734 Raises:
735 KeyError:
736 self.get_key_strict() is True and
737 key cannot be found in
738 HumanData.SUPPORTED_KEYS.
739 ValueError:
740 Value is supported but doesn't match definition.
741 """
742 self.__check_key__(key)
743 self.__check_value__(key, val)
744 dict.__setitem__(self, key, val)
745
746 def pop_unsupported_items(self) -> None:
747 """Find every item with a key not in HumanData.SUPPORTED_KEYS, and pop

Callers

nothing calls this directly

Calls 3

__check_key__Method · 0.95
__check_value__Method · 0.95
__setitem__Method · 0.45

Tested by

no test coverage detected