(
self,
value: typing.Any,
attr: str | None,
data: typing.Mapping[str, typing.Any] | None,
**kwargs,
)
| 864 | ) |
| 865 | |
| 866 | def _deserialize( |
| 867 | self, |
| 868 | value: typing.Any, |
| 869 | attr: str | None, |
| 870 | data: typing.Mapping[str, typing.Any] | None, |
| 871 | **kwargs, |
| 872 | ) -> tuple: |
| 873 | if not utils.is_sequence_but_not_string(value): |
| 874 | raise self.make_error("invalid") |
| 875 | |
| 876 | self.validate_length(value) |
| 877 | |
| 878 | result = [] |
| 879 | errors = {} |
| 880 | |
| 881 | for idx, (field, each) in enumerate(zip(self.tuple_fields, value, strict=True)): |
| 882 | try: |
| 883 | result.append(field.deserialize(each, **kwargs)) |
| 884 | except ValidationError as error: |
| 885 | if error.valid_data is not None: |
| 886 | result.append(error.valid_data) |
| 887 | errors.update({idx: error.messages}) |
| 888 | if errors: |
| 889 | raise ValidationError(errors, valid_data=result) |
| 890 | |
| 891 | return tuple(result) |
| 892 | |
| 893 | |
| 894 | class String(Field[str]): |
nothing calls this directly
no test coverage detected