(cls, value)
| 45 | |
| 46 | @classmethod |
| 47 | def load(cls, value): |
| 48 | if isinstance(value, dict) and "string" in value: |
| 49 | value = value["string"] |
| 50 | value = str(value).upper() |
| 51 | for attr in dir(cls): |
| 52 | attr_value = getattr(cls, attr) |
| 53 | if isinstance(attr_value, dict) and "string" in attr_value and attr_value["string"] == value: |
| 54 | return attr_value |
| 55 | raise Exception(f"No proxy type is found for {value}") |
| 56 | |
| 57 | |
| 58 | class _ProxyTypeDescriptor: |
no test coverage detected