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)
| 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 |
nothing calls this directly
no test coverage detected