Parse a string as a value for the given key.
(cls, key, string: str)
| 711 | |
| 712 | @classmethod |
| 713 | def _parse(cls, key, string: str) -> Any: |
| 714 | """Parse a string as a value for the given key.""" |
| 715 | if not isinstance(string, str): |
| 716 | raise TypeError("_parse() argument must be a string") |
| 717 | |
| 718 | return cls._type(key).parse(string) |
| 719 | |
| 720 | def set_parse(self, key, string: str): |
| 721 | """Set the object's key to a value represented by a string.""" |