From a53475a3fe4cd089606f8e0d7c06b21fd9a77cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lafr=C3=A9choux?= Date: Thu, 28 Oct 2021 08:49:30 +0200 Subject: [PATCH] typing.cast field_obj.attribute --- src/marshmallow/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index a8dc6ce04..13653baf7 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -663,7 +663,7 @@ def _deserialize( index=index, ) if value is not missing: - key = field_obj.attribute + key = typing.cast(str, field_obj.attribute) set_value(ret_d, key, value) if unknown != EXCLUDE: fields = {field_obj.data_key for field_obj in self.load_fields.values()}