@@ -23,7 +23,7 @@ def of_type(cls, converter: type):
23
23
return type (name , bases , attributes )
24
24
25
25
@classmethod
26
- def to_python_value (cls , deserialized_data , * , target_object ):
26
+ def to_python_value (cls , deserialized_data , * , target_object = None ):
27
27
if target_object is None or target_object is Missing :
28
28
value = []
29
29
else :
@@ -92,7 +92,7 @@ class Set(List):
92
92
"""Base converter for sets."""
93
93
94
94
@classmethod
95
- def to_python_value (cls , deserialized_data , * , target_object ):
95
+ def to_python_value (cls , deserialized_data , * , target_object = None ):
96
96
if target_object is None or target_object is Missing :
97
97
value = set ()
98
98
else :
@@ -137,7 +137,7 @@ def of_mapping(cls, key: type, value: type):
137
137
return type (name , bases , {})
138
138
139
139
@classmethod
140
- def to_python_value (cls , deserialized_data , * , target_object ):
140
+ def to_python_value (cls , deserialized_data , * , target_object = None ):
141
141
if isinstance (deserialized_data , dict ):
142
142
data = deserialized_data .copy ()
143
143
else :
@@ -176,7 +176,7 @@ def of_mappings(cls, dataclass, converters: Dict[str, type]):
176
176
return type (name , bases , attributes )
177
177
178
178
@classmethod
179
- def to_python_value (cls , deserialized_data , * , target_object ):
179
+ def to_python_value (cls , deserialized_data , * , target_object = None ):
180
180
if dataclasses .is_dataclass (deserialized_data ):
181
181
data = dataclasses .asdict (deserialized_data )
182
182
elif isinstance (deserialized_data , dict ):
0 commit comments